making program about inheritance code example
Example: inheritance programmiz
class Animal {
// methods and fields
}
// use of extends keyword
// to perform inheritance
class Dog extends Animal {
// methods and fields of Animal
// methods and fields of Dog
}