In java, if a method NOT inherited by any subclass is called, whether dynamic binding or static binding is used?
I know it won’t make any difference to the output in this particular case, but just wanted know this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Instance method calls in Java always use dynamic binding. Static methods and direct access to private members use static binding.
In length:
http://geekexplains.blogspot.com/2008/06/dynamic-binding-vs-static-binding-in.html
This article explains it pretty good.