Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding abstarct classes

 
Kaush Kane
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i HAVE A QUESTION PLZ ADVICE....

Subclasses of an abstract class that do not provide an implementation of an abstract method, are also abstract??
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Such a class does not compile.

If you mark them as abstract, though, they will compile. There's no such thing as a non-abstract class that inherits from an abstract class and does not provide implementations of its parent's abstract methods.
 
Ramasubbhu Allur Kuppusamy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In other words, the first concrete subclass of an abstract class should implement all the methods in the abstract parentclass.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic