• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about Abstract classes...  RSS feed

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you have a class that is inherited from another class and the descendant
class be abstract and the parent is not?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37462
537
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Barry,
Yes. Any class in the hierarchy can introduce abstract methods. In fact many abstract classes extend java.lang.Object - a concrete class.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And note that you are free to label any class abstract, whether or not it contains any abstract methods.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!