This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cau give clear explanation

 
anilkumar choudary
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)is overloading is related to one class only or it can be extended in the derived class,also
2) why we need the hash code where we use it in realtime
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Both. One class may have two or more methods with the same name but different signatures. When this happens it is said to be overloaded. Likewise a class may have a method with the same name and a different signature than one inherited from another class, this is still overloading.

2. See HashMap for one example.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic