File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Regarding Abstract Class 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 "Regarding Abstract Class" Watch "Regarding Abstract Class" New topic

Regarding Abstract Class

Mohana Priya
Ranch Hand

Joined: Jan 16, 2005
Posts: 45
An Absract class with concrete static methods alone need not be sub-classed in its life time .Am I right ?

SCJP 1.4<br />SCWCD 1.4
Burkhard Hassel
Ranch Hand

Joined: Aug 25, 2006
Posts: 1274
Did you mean cannot be subclassed?
If so the answer is no, can be subclassed.

But this class needs not to be abstract, methods being static or not.

all events occur in real time
Jeronimo Sanchez

Joined: Jul 17, 2006
Posts: 23
What I think Mohana is trying to ask is if all methods in an abstract class are static, do we need to sub-class the class? And the answer is no, we do not need to do so to call the static methods.

It's perfectly legal to invoke static methods within abstract classes. Check the foloowing example:

Other question is why to have an abstract class with only static methods.

Preparing SCJP 1.5
Dave Reinhardt
Ranch Hand

Joined: Aug 07, 2006
Posts: 54
There are a few abstract classes with static methods in the API that are part of the SCJP exam. See page 471 in SCJP


Can anyone name others that we need to know for the exam?
I agree. Here's the link:
subject: Regarding Abstract Class
It's not a secret anymore!