NTU-OOP-Tuts-2024/T5Q2-B-FromSol2/src/Main.java

15 lines
380 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 - Works
ClassF a = new ClassF();
a.print("hello", "there");
}
}