1/9/15

Final in Java

final
Java



You will often get questioned "What is final in java". Answer is really simple

Final is a keyword in Java.

Case 1 : with Class

When a class made final, it can not be extended.


Case 2 : with Method

When we make a method final, it can not be overridden.


Case 3 : with Variable

When we make a variable final, it becomes contactant as once it is initialized, its value can not change