摘要:
一:运行 TestInherits.java 示例,观察输出,总结。 TestInherits.java class Grandparent { public Grandparent() { System.out.println("GrandParent Created."); } public G 阅读全文
摘要:
设计思路: 设计,1个类,每设置一个对象,类中变量则加1,最后设置一个main类,调用之前的类,输出结果。 程序源码: public class sum { public static int a=0; public sum() { a++;} public int get() {return a; 阅读全文