📄 arithmatic2test.java
字号:
/** 一个简单的应用程序,用来说明算术运算符的优先级 */
/** 类Arithmatic2Test */
public class Arithmatic2Test{
/** main()方法 */
public static void main( String args[] ){
int a=9;
int b=18;
int c=-34;
double d=-100.89;
int e=a+b--; //e=27,b=17
b++; //b=18
int f=a+(--b);//f=26,b=17
double g=c+d/a; //g=-45.21
double h=(c-d)*a;//h=66.89*9=602.01
System.out.println("a = "+a);
System.out.println("b = "+b);
System.out.println("c = "+c);
System.out.println("d = "+d);
System.out.println("e = "+e);
System.out.println("f = "+f);
System.out.println("g = "+g);
System.out.println("h = "+h);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -