2022年3月19日

一些关于泛型模模糊糊的地方

摘要: public class Something { public static void main(String[] args) { ArrayList<Animal> list = new ArrayList<Animal>(); list.add(new Tiger()); }}class Ani 阅读全文

posted @ 2022-03-19 23:16 我要当程序源 阅读(16) 评论(0) 推荐(0) 编辑

经典题目 (锻炼编程能力)

摘要: 定义 Employee类 定义MyDate 类 year , month , day( 相关get set tostring ) 该类包含 属性name , sal , birthday , 其中birthday是MyDate类型 创建三个对象放入 AryyList中 ( 使用泛型 ) 对集合中的元 阅读全文

posted @ 2022-03-19 22:57 我要当程序源 阅读(28) 评论(0) 推荐(0) 编辑

导航