package trying;
import java.util.Scanner;
public class calculation {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int a=input.nextInt();
int b=input.nextInt();
int d=a+b;
System.out.println(d);
}
}
答案 0 :(得分:0)
首先应该使用以下命令编译java:
javac calculation.java
作为第二步,我将使用此命令运行程序:
java calculation
对于此问答的更详细版本,我将参考重复的帖子:How do I compile and run a program in Java on my Mac?