Forums Java Help What is an abstract class

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3954
    Aakanksha
    Participant

    What is an abstract class?

    #11567
    Aakanksha
    Participant

    Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie. you may not call its constructor), abstract class may contain static data.

    Any class with an abstract method is automatically abstract itself, and must be declared as such. A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.