Page 1
Wink Notes
B.Tech CSE — 5th Semester
Java Programming
— Unit - 2 —
1. Abstract Classes
An abstract class is a class that is declared with the `abstract` keyword. It represents a conceptual template that cannot be instantiated directly.
1.1 Key Characteristics
- You cannot create an object using `new AbstractClass()`.
- It can contain both abstract methods (methods without a body) and concrete methods (normal methods with a body).
- If a class contains even one abstract method, the class itself MUST be declared abstract.
- Any subclass inheriting from an abstract class MUST override and provide bodies for all of its abstract methods, or else the subclass must also be declared abstract.