Object type determines which overridden method is used at runtime.Reference type determines which overloaded method is used at compile time.
Thanks & Regards
Swapna Gouri
I "try", I "catch" and "finally" WIN !!!
Thanks & Regards
Swapna Gouri
I "try", I "catch" and "finally" WIN !!!
Which overloaded version is called is determined at the compile time - does this mean that the compiler determines this by looking at the number of arguments & type of arguments being passed to a method?
But in the case of overloading, unless the bytecode gets interpreted how can the compiler come to know that the method is overloaded but not overridden ?
Also, which overridden version is called is known at runtime to the JVM - does it mean only after interpreting the byte code the JVM comes to know that the method is being overridden ??
Thanks & Regards
Swapna Gouri
I "try", I "catch" and "finally" WIN !!!