摘要: class Demo05{ public static void main(String[] args) { int a=1; a++; int b=1 + a++ + a + a++; System.out.println(a); System.out.println(b); }} 结果: ++a 阅读全文
posted @ 2019-12-07 09:43 墨染千城 阅读(143) 评论(0) 推荐(0)
摘要: 编译时报错,叫做编译失败 class Demo01 { public static void main(String[] args) { int a; a=12; System.out.println(a); }} n 变量定义后可以不赋值,使用时再赋值。不赋值不能使用。 public static 阅读全文
posted @ 2019-12-07 08:51 墨染千城 阅读(138) 评论(0) 推荐(0)