摘要: 集合类说明及区别Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口 Collection是最基本的集合接口,一个Collection代表一组Object,即Collection的元素(Elements)。一些Collection允许相同的元素而另一些不行。一些能排序而另一些不行。Java SDK不提供直接继承自Collection的类,Java SDK提供的类都是继承自Collection的“子接口”如List和Set。 所有实现Col.. 阅读全文
posted @ 2013-05-03 18:01 罗小姿 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 一、定义一个接口public interface Plane {public void fly();}二、实现接口中的方法public class ManagerImpl implements Plane{ @Override public void fly() { System.out.println("飞机起飞了"); } }三、import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method;public class BusinessHandler implements Invoca 阅读全文
posted @ 2013-05-03 16:25 罗小姿 阅读(113) 评论(0) 推荐(0) 编辑