What is the difference between private method and final method in java? -


what asking "in functionality point of view 'privateandfinal` methods not overriden". can use 1 access modifier i.e private in functionality point of view?

private accessibility public or protected or no modifier.
final modification during inheritance.

  • private methods not accessible outside of class.
  • final methods can not overridden child class.

as private method not accessible child classes cannot overridden final method can or can not accessible based on access modifier.


Comments