Super class = new Sub();
Is Super called the reference and is Sub the actual class?
I've read about one being compile time and the other being run time, but I don't know how that affects me as a programmer or which one is which?
Super class = new Sub();
Is Super called the reference and is Sub the actual class?
I've read about one being compile time and the other being run time, but I don't know how that affects me as a programmer or which one is which?
Here Super is the type of object reference whereas Sub is the type of the actual object which is created in the heap.