What is the extends keyword in Java?
The extends keyword is used to create a relationship between two classes, making the parent class inherit methods from the child class.
Actually, the extends keyword allows the subclass to inherit methods from the superclass, not the other way around.
Can you clarify how a subclass inherits methods from the superclass?