标签:
class Dog(){ eat(); } ArrayList<Object> myArrayList = new ArrayList<Object>(); Dog aDog = new Dog(); myArrayList.add(aDog); object d = myArrayList.get(0); (Dog)d.eat();
从object类转换成其他类
原文地址:http://www.cnblogs.com/justwin/p/5016974.html