Which of the below statements are true about final methods in java?
final methods will not be inherited.
final methods can be overridden.
Object class uses many final methods.
We can use private methods in place of final methods, as both are same.
Object class has many final methods like wait, notify, notifyAll, getClass. Remaining statements are wrong.
1. Final methods will be inherited if it is not private.
2. Final methods can't be overridden
3. Private methods will not be inherited so the purpose of private methods is different compared to final methods, and hence can't be used in interchangeable manner.
Back To Top