FINAL KEYWORD IN JAVA- INTERVIEW

preview_player
Показать описание
Final keyword can be used with a :
variable
method
class
If you make any variable as final, you cannot change the value of final variable(It will be constant).
If you make any method as final, you cannot override it.
If you make any class as final, you cannot extend it.
A final method is inherited but you cannot override it.
A final variable that is not initialized at the time of declaration is known as blank final variable.
A static final variable that is not initialized at the time of declaration is known as static blank final variable. It can be initialized only in static block.
Рекомендации по теме
Комментарии
Автор

This is helpful... you need more audience coz some of your videos are really helpful...

NitinSharma-sweh