-1
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?

tazboy
  • 1,685
  • 5
  • 23
  • 39
  • I created the other question early but was unable to delete it. There were too many answers to change the original question. I already asked for them to delete that question. Also, it's not a duplicate because the other one used an interface as the super class. This one uses just a class. – tazboy Feb 01 '16 at 17:26

1 Answers1

0

Here Super is the type of object reference whereas Sub is the type of the actual object which is created in the heap.

Pooja Arora
  • 574
  • 7
  • 19
  • Ok. That seems to make sense when using Eclipse. The 'Sub' is colored the same as its constructor. – tazboy Feb 01 '16 at 17:28