it prints B. I just want to clarify my ideas: the baz() method is overriden by class B. Since the method is overriden the method to call is only decided at runtime using the object type, in this case B. am I right? If the method happened to be overloaded (different arguments) then the method to call is decided at compile time, using the reference (in this case A, right? So.. If I'm right? is this the reason why this is called a polymorphic call?
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury