摘要:
知识点一:类型转换 源代码: class Mammal{} class Dog extends Mammal {} class Cat extends Mammal{} public class TestCast { public static void main(String args[]) { 阅读全文
摘要:
1、运行TextInherists.java 示例,观察输出,注意总结父类与子类之间构造方法的的调用关系,修改parent构造方法的代码,显式调用grandparent另一个构造函数。 源代码: class GrandParent{ public GrandParent(){ System.out. 阅读全文