FINAL KEYWORD IN JAVA- INTERVIEW

Опубликовано: 18 Июнь 2026
на канале: Sudipto Roy
123
5

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.