# Abstract Class Abstract class ek incomplete class hai. Object create nahi ho sakta. Child class extend karke complete karta hai. ## Syntax ```java abstract class Shape { String color; Shape(String color) { this.color = color; } // Abstract method — subclass implement karega abstract double area(); abstract double perimeter(); // Concrete method void displayColor() { System.out.println("Color: " + color); } } ``` ## Extend karna ```java class Circle extends Shape { double radius; Circle(String color, double radius) { super(color); this.radius = radius; } @Override double area() { return Math.PI * radius * radius; } @Override double perimeter() { return 2 * Math.PI * radius; } } class Rectangle extends Shape { double width, height; Rectangle(String color, double w, double h) { super(color); this.width = w; this.height = h; } @Override double area() { return width * height; } @Override double perimeter() { return 2 * (width + height); } } ``` ## Rules - `abstract` keyword use karo - Abstract class ka object nahi banta - Abstract methods ka body nahi hota - Child class sabhi abstract methods implement kare (ya khud abstract ho) - Constructor ho sakta hai ## Use Case Template Method Pattern mein use hota hai — common algorithm define karo, specific steps subclass mein.