自增,自减的概念

//++ --   自增, 自减  一元运算符
int a = 3;

int b = a++; //执行完这行代码后,先给b赋值,再自增
//a = a + 1;
System.out.println(a); //a = 4
System.out.println(b); //b = 3

System.out.println("//==============================");

int c = 3;
int d = ++c; //执行这行代码前,先自增,再给d赋值
System.out.println(c); //c = 4
System.out.println(d); //d = 4

自增,自减的概念

上一篇:Hedera 共识服务(HCS)详解


下一篇:No buffer space available (maximum connections rea