ArithmaticOp

来源:互联网 发布:数组正序遍历含义 编辑:程序博客网 时间:2024/06/14 22:52
public class ArithmaticOp{ public static void main( String args[] ){ int a=5+4; //a=9 int b=a*2; //b=18 int c=b/4; //c=4 int d=b-c; //d=14 int e=-d; //e=-14 int f=e%4; //f=-2 double g=18.4; double h=g%4; //h=2.4 int i=3; int j=i++; //i=4,j=3 int k=++i; //i=5,k=5 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); System.out.println("i = "+i); System.out.println("j = "+j); System.out.println("k = "+k); } } 

0 0