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.
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.
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.