public class jh_a加加和加加a的区别 {
public static void main(String[] args) {
int a = 5;
int b = 5;
int x = a ++ * 2;
System.out.println(x);
int y = ++ b * 2;
System.out.println(y);
/*
* a ++ 是先做运算然后再对自身加1
* ++ a 是先自身加1,然后再做运算
*/
System.out.println(a);
System.out.println(b);
}
}