This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Override Vs Redefinition" Watch "Override Vs Redefinition" New topic

Override Vs Redefinition

Sundararaj Govindasamy
Ranch Hand

Joined: Dec 06, 2007
Posts: 43

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(){
class Dog extends Animal{
static void doStuff(){
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

SCJP 1.6 88% ;-)
SCWCD 1.5 97% ;-)
marc weber

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
Sundararaj Govindasamy
Ranch Hand

Joined: Dec 06, 2007
Posts: 43

Thank you Marc.
The link provided by you is nice and useful . I am now clear about this topic.
I agree. Here's the link:
subject: Override Vs Redefinition
Similar Threads
K&B book doubt on page 147
what is the difference between redefining and overriding a method in a subclass
Static method : Redefinition or an override ?
Overridding Doubt
Overriden VS Redefinition