+ 2

Java keywords

why final is used in java

14th Mar 2018, 4:39 PM
Harish Vellala
Harish Vellala - avatar
2 Respuestas
+ 9
to make variable a constant
14th Mar 2018, 6:21 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 5
it is not possible to modify variable, if it is declared as final. To create constant variable final is used prevents method overriding if methods are declared as final. not possible to inherit a class if it is declared as final
14th Mar 2018, 4:45 PM
Manorama
Manorama - avatar