0% found this document useful (0 votes)
15 views1 page

Understanding Abstract Classes in Java

An abstract class in Java cannot be instantiated, but it can have references. Any class that extends an abstract class must implement all its abstract methods, or it too must be declared abstract. Abstract classes can contain both abstract and non-abstract methods, with abstract methods only being allowed within abstract classes.

Uploaded by

iafianasimkhan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Understanding Abstract Classes in Java

An abstract class in Java cannot be instantiated, but it can have references. Any class that extends an abstract class must implement all its abstract methods, or it too must be declared abstract. Abstract classes can contain both abstract and non-abstract methods, with abstract methods only being allowed within abstract classes.

Uploaded by

iafianasimkhan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

ABSTRACT CLASS IN JAVA

.you cannot create object of the abstract class(cannot be instantiated)


.you can create reference of the abstract class
.extended class should define all its abstract method but if it cannot define all
the abs method then just also make it an abs class but problem will be no obj can
be created in the main class so in that case do an extended class of this class
which will be basically called concrete class.
.an abstract class can have both abstract and non abstract method
.an abstract method can only be inside an abstract class

You might also like