摘要: 1 public class Duck {2 public Duck(){3 System.out.println("I'm constructing!");4 }5 public static void main(String[] args) { 6 Duck d = new Duck(); 7 }8 } 阅读全文
posted @ 2013-09-12 00:21 boom boom pow 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1 abstract class Report { 2 void runReport() { 3 System.out.println("设置报告"); 4 } 5 6 void printReport(){ 7 System.out.println("输出报告"); 8 } 9 }10 11 public class BuzzwordsReport extends Report {12 void runReport() {13 //在这里写代码14 super.runRepor... 阅读全文
posted @ 2013-09-12 00:15 boom boom pow 阅读(120) 评论(0) 推荐(0) 编辑