摘要: java中的自增自减和幂方写法 java中的自增 a++或++a public class Demo4 { public static void main(String[] args) { int a = 3; int b = a++; //++相当于a=a+1,但是a++是先给b赋值(b=未加时的 阅读全文
posted @ 2021-02-28 15:11 默默努力的路人甲 阅读(79) 评论(0) 推荐(0)
摘要: java基本运算符解析(1) 基本加减乘除间运算 public class Demo1 { public static void main(String[] args) { int a = 20; int b = 30; int c = 40; int d = 25; System.out.prin 阅读全文
posted @ 2021-02-28 10:21 默默努力的路人甲 阅读(53) 评论(0) 推荐(0)
摘要: java变量 局部变量 public class Demo5 { public static void main(String[] args) { int numFirst = 100; System.out.println(numFirst); }//定义在在public static void 阅读全文
posted @ 2021-02-28 09:46 默默努力的路人甲 阅读(186) 评论(0) 推荐(0)