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

About overload

 
chun-ju Lin
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just a bigginer,so maybe my question is a little stupid.
Dose overload only happen in one class,or just like override,one child class can overload it's parent class's method?
 
eammon bannon
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You overload a method for the same type of object. If B extends A, then B is a type of A. So you can overload a method in B that exists in A, assuming the method is not private.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic