一.基本原理
二.实现过程
1.在桌面上编写.java文件
public class calculator {
public static void main(String[] args) {
int num1 = 7;
int num2 = 5;
int _sum =num1 +num2;
int minus = num1 - num2;
int Sum = _sum*minus;
System.out.println(Sum);
}
}
2.在桌面上编译.java文件,用javac命令:javac calculator.java
3.在桌面上执行.calss文件,用java命令:java calculator