摘要:
扩展赋值运算符:+=,-=,*=,/= public class Dome1 { public static void main(String[] args) { int a = 10; int b = 20; a+=b;//相当于a=a+b System.out.println("a="+(a)) 阅读全文
摘要:
逻辑运算符:&&与,||或, !非 public class Dome1 { public static void main(String[] args) { boolean a = true; boolean b = false; System.out.println("a&&b:" + (a & 阅读全文
摘要:
一元运算符:++自增,--自减 public class Dome1 { public static void main(String[] args) { int a = 3; int b = a++;//先给b赋予a的初始值3,再执行a自增,这时a的值变成了4 System.out.println 阅读全文