Abstract classes cannot be instantiated and are used to provide a base for subclasses to build upon.
Source Code
abstract class Animal {
abstract void makeSound();
void eat() {
System.out.println("Animal is eating");
}
}
class Dog extends Animal {
void makeSound() {
System.out.println("Bark");
}
}