2017年4月14日
摘要: 1 public class Test2 { 2 public void add(Byte b) { 3 b = b++; 4 } 5 6 public void test() { 7 Byte a = 127; 8 Byte b = 127; 9 add(++a); 10 System.out.p 阅读全文
posted @ 2017-04-14 12:46 呵呵静 阅读(7220) 评论(1) 推荐(1) 编辑
摘要: 1 public class Test3 { 2 public static void main(String[] args) { 3 int x = 0; 4 int y = 0; 5 int k = 0; 6 for (int z = 0; z < 5; z++) { 7 if ((++x > 阅读全文
posted @ 2017-04-14 12:42 呵呵静 阅读(643) 评论(0) 推荐(0) 编辑
摘要: public class Test { public int add(int a, int b) { try { return a / b; } catch (Exception e) { System.out.println("catch语句块"); } finally { System.out. 阅读全文
posted @ 2017-04-14 12:39 呵呵静 阅读(1098) 评论(0) 推荐(0) 编辑
摘要: 情况一:没有继承父类时 1 class HelloA { 2 3 public HelloA() { 4 System.out.println("I'm A class"); 5 } 6 7 static { 8 System.out.println("static A"); 9 } 10 11 { 阅读全文
posted @ 2017-04-14 12:35 呵呵静 阅读(2184) 评论(0) 推荐(0) 编辑