• Post Reply Bookmark Topic Watch Topic
  • New Topic

explain the concept?  RSS feed

 
bairava surya
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Stevens Miller
Bartender
Posts: 1445
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java Language Specification calls for the most specific method to be called:
JLS 15.12.2.5 wrote:If more than one member method is both accessible and applicable to a method invocation, it is necessary to choose one to provide the descriptor for the run-time method dispatch. The Java programming language uses the rule that the most specific method is chosen.


Note that your code won't compile if you have two (or more) methods of equal specificity:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!