aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Abstract class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract class" Watch "Abstract class" New topic
Author

Abstract class

Jacob Michaels
Ranch Hand

Joined: Mar 23, 2003
Posts: 35
I was taking one of Marcus Green's exams and it said this:
"Any class derived from an abstract class must either define all of the abstract methods or be declared abstract itself"
Does this mean when I extend an abstract class, I can declare all of my methods in the new class abstract, and I don't have to declare the new class abstract.
Thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12821
    
    5
Your new class will have to be abstract if it has any abstract methods. Even without any abstract methods you have the option of declaring it abstract.
Bill
Marlene Miller
Ranch Hand

Joined: Mar 05, 2003
Posts: 1391
I wonder whether "define" in this sentence means "implement".
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Yes, I think Marcus' choice of words is poor.
I would phrase it as:
"Any class derived from an abstract class must either implement all of the abstract methods or be declared abstract itself"


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract class