This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes question about abatract Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "question about abatract" Watch "question about abatract" New topic
Author

question about abatract

michael wang
Ranch Hand

Joined: Feb 06, 2002
Posts: 35
why abstract method can not be static or private?
thanks


--<br />a java beginner from China
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
An abstract method can't be private because there would be no way for a subclass to implement it! It would not be inherited by any subclasses, so there would be no way to provide a body for it.

Static methods cannot be overriden by a subclass; they can be hidden, but not overridden. Therefore, there is no way to provide an implementation for the superclass.


Rob
SCJP 1.4
michael wang
Ranch Hand

Joined: Feb 06, 2002
Posts: 35
exactly clear,thanks Rob
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: question about abatract