- Cannot be instantiated.
- Used as a base class that requires subclasses to implement abstract methods.
abstract class Animal {
abstract fun makeSound()
}
class Dog : Animal() {
override fun makeSound() = println("Woof!")
}
abstract class Animal {
abstract fun makeSound()
}
class Dog : Animal() {
override fun makeSound() = println("Woof!")
}