• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Overridding

 
Abhi vijay
Ranch Hand
Posts: 509
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Isnt this legal Overridding?? Then how can I override non-static method with a static???
 
Vijay Raj
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't over-riding at all. A static method is a class method, it belongs to the class. A non-static method in a sub-class with the same name as a static method of the super class is actually a brand new method and has no relation to the super class' method.

Vijay.
 
Kiran Shigli
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No! The non-static go method is just a new method in the subclass. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic