![]() |
JAVA EXAMPLE PROGRAMS |
Publish Your Article Here
|
|
|
Java2Novice - YouTube Channel
Knowledge Centre
What is abstract class or abstract method?
We cannot create instance for an abstract class. We can able to create
instance for its subclass only. By specifying abstract keyword just before
class, we can make a class as abstract class.
public abstract class MyAbstractClass{ } Abstract class may or may not contains abstract methods. Abstract method is just method signature, it does not containes any implementation. Its subclass must provide implementation for abstract methods. Abstract methods are looks like as given below: public abstract int getLength(); Famous Quotations
The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails.
-- William Arthur Ward
|
Reference: Java™ Platform Standard Ed. 7 - API Specification | Java™ Platform Standard Ed. 8 - API Specification | Java is registered trademark of Oracle. |
Privacy Policy | Copyright © 2022 by Nataraja Gootooru. All Rights Reserved. |