摘要: 结果: 阅读全文
posted @ 2016-05-24 14:40 唐枫 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 按要求编写Java程序: (1)编写一个接口:InterfaceA,只含有一个方法int method(int n); (2)编写一个类:ClassA来实现接口InterfaceA,实现int method(int n)接口方法时,要求计算1到n的和; (3)编写另一个类:ClassB来实现接口In 阅读全文
posted @ 2016-05-24 14:22 唐枫 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 编写2个接口:InterfaceA和InterfaceB;在接口InterfaceA中有个方法void printCapitalLetter();在接口InterfaceB中有个方法void printLowercaseLetter(); 然后写一个类Print实现接口InterfaceA和Inte 阅读全文
posted @ 2016-05-24 14:07 唐枫 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 1. 概述在引入范型之前,Java类型分为原始类型、复杂类型,其中复杂类型分为数组和类。引入范型后,一个复杂类型就可以在细分成更多的类型。例如原先的类型List,现在在细分成List<Object>, List<String>等更多的类型。注意,现在List<Object>, List<String 阅读全文
posted @ 2016-05-24 08:24 唐枫 阅读(232) 评论(0) 推荐(0) 编辑