aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Override Vs Redefinition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Override Vs Redefinition" Watch "Override Vs Redefinition" New topic
Author

Override Vs Redefinition

Sundararaj Govindasamy
Ranch Hand

Joined: Dec 06, 2007
Posts: 45

Hai Folks,
I have a doubt . What is difference between redefinition and overriding?

In kathy's book, page 147 . I found the following code fragments..

class Animal{
static void doStuff(){
System.out.print("a");
}
}
class Dog extends Animal{
static void doStuff(){
System.out.print("d");
}
}
Here both doStuff() method signatures are identical right ? Then , why they are called "redefined " here instead of overriding ? Give me more informations regards this .
Thank you in advance


Former folding tailor
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

See Overriding vs. Hiding.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Sundararaj Govindasamy
Ranch Hand

Joined: Dec 06, 2007
Posts: 45

Thank you Marc.
The link provided by you is nice and useful . I am now clear about this topic.
 
wood burning stoves
 
subject: Override Vs Redefinition