abstract method can be final code example
Example 1: Can a method be abstract and final in abstract class
No, we cannot have abstract final methods. final methods mean
- cannot be overridden.
the abstract method needs to be overridden
Example 2: final method and abstract method
Final method: Cannot be overridden (changing implementation)
Abstract method: is meant to be overridden
Any method can be final whether static or non-private you can
make the as final. cannot be abstract.
constructor cannot be final you cannot declare without body