Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dan Chisholm question about abstract classes

 
Maria Garcia
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the follow are true statements.
a. Any named class can be declared abstract.
b. An incompletely implemented class must be declared abstract.
c. A local class can be declared abstract.
d. An abstract class can be instantiated.
e. An abstact class is implicitly final.
f. An abstact class must declare at least one abstract method.
g. An abstact class can not extend a concrete class.
h. None of the above.
Is letter a correct ? What about classes that are already declared as final ? help! im confused
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A class that is not anonymous can be declared abstract as long as it is not also declared using a modifier that is not compatible with the abstract modifier. Maybe a better way to ask that same question would be as follows.
a. An anonymous class can be declared abstract.
The correct answer would be "false".
To avoid confusion I think I'll change answer option 'a' to the above in the next version of the exam.
 
Maria Garcia
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic