回覆列表
  • 1 # 使用者7169188564904

    abstruct class SuperClass{

    abstruct void display();

    }

    public class SubClassA extends SuperClass{

    public void display(){

    System.out.println("SubClassA ");

    }

    }

    public class SubClassB extends SuperClass{

    public void display(){

    System.out.println("SubClassB ");

    }

    }

    public class PolyTester{

    public static void main(String[] argc){

    SuperClass sa = new SubClassA();

    SuperClass sb = new SubClassB();

    SuperClass[] sc = {sa,sb};

    for(int i=0; i

  • 中秋節和大豐收的關聯?
  • 開心果是種什麼水果啊?聽說伊朗的開心果很有名?