NTU-OOP-Tuts-2025-1/T5Q2-B-FromSol1/src/Main.java

15 lines
449 B
Java

public class Main {
public static void main(String[] args) {
// I - Works
// ClassC c = new ClassD();
// c.print("hello", "there");
// II - Does not compile because class C is abstract
// ClassA a = new ClassC();
// a.print(1, "there");
// III - Doesn't work - Class A does not have print(string, string) method
// ClassA a = new ClassF();
// a.print("hello", "there");
}
}