摘要: Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案Eclipse 编译时报错:Access restriction:The type JPEGCodec is not... 阅读全文
posted @ 2015-07-30 15:50 淡纷飞菊 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1. 测试类的私有方法时可以采取两种方式:1) 修改方法的访问修饰符,将private修改为default或public(但不推荐采取这种方式)。2) 使用反射在测试类中调用目标类的私有方法(推荐)。 1 package junit; 2 3 public class Calculator2 4 ... 阅读全文
posted @ 2015-07-30 11:52 淡纷飞菊 阅读(334) 评论(0) 推荐(0) 编辑
摘要: int.class返回Integer的对象Integer.type返回int对象 阅读全文
posted @ 2015-07-30 11:48 淡纷飞菊 阅读(733) 评论(0) 推荐(0) 编辑
摘要: 1 package test; 2 3 public class MyStack 4 { 5 private String[] elements; 6 7 private int nextIndex; 8 9 public MySta... 阅读全文
posted @ 2015-07-30 10:14 淡纷飞菊 阅读(442) 评论(0) 推荐(0) 编辑