This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Runtime and Compiletime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic
Author

Runtime and Compiletime

John Paterson
Ranch Hand

Joined: Mar 12, 2012
Posts: 121
Hi folks...

Do have a look at the following code:



Is it true that at comple time it's checked if the 'eat' method exists in the Animal class and at runtime Java selects the actual version of the method that is to be run, which in this case for object ref b it would have to be the eat method of the 'Horse' class??

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9955
    
163

Please continue the discussion in your duplicate thread here http://www.coderanch.com/t/584125/java-programmer-SCJP/certification/run-time-compile-time

[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Runtime and Compiletime
 
Similar Threads
overloaded method call rules
Polymorphism
run-time and compile-time
which version of method is actually called ? the reference one or actual object one ?
Confused in function overriding