Meaningless Drivel is fun!
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "question about abatract" Watch "question about abatract" New topic

question about abatract

michael wang
Ranch Hand

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

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

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.

SCJP 1.4
michael wang
Ranch Hand

Joined: Feb 06, 2002
Posts: 35
exactly clear,thanks Rob
I agree. Here's the link:
subject: question about abatract
It's not a secret anymore!