Abstract class in Java
An abstract class is a partial blueprint. Some methods may be unfinished on purpose. Write abstract class Shape { ... }. You cannot do new Shape() if Shape is abstract.
An abstract method has no body. Children must implement it, unless the child is also abstract. The abstract class can still have normal methods with real code — that shared code is the point.
Use it when related classes share code and a common contract: Circle and Rectangle both extend Shape, both implement area(), both reuse colour(). Instantiating an abstract class with new is the beginner mistake.
Let's take this on the board with one tiny Main class — no extra files. Abstract class in Java — output: 12.56. You cannot write new Shape() — Shape is abstract. new Circle(2) fills in area(). Start from main, go line by line, and stop at each print. That output is the proof for Abstract class.
abstract class Shape
area() ← no body
print() ← real code
│ extends
▼
Circle implements area()Abstract class = shared code + forced methods for children.