Final:
1. It is a non access modifier that can be applied to variables,methods and to class.
2. Final means non-changable.
Final variable:
1. If a variable is declared as final it can't be re-assigned.
2. If there is any final variable in class simply compiler replaces its original value to that variable at compile time only,hence at runtime direct the constant value participates.
3. Final variable should must be initialized at the declaration time.
4. Final variable doesn't get any default value by compile or jvm,the programmer needs to initialize.
Final Method:
1. If we are declaring method as final in class, that method can't be re-defined or override.
2. If parent class want that their child can't re-define the method then parent class can define the final method in their class.
Final Class:
1. If we are declaraing class as final, that class can't be inherited.
2. For example-String class is final and we can't extends the String class.
Finally:
1. Finally is the keyword that comes along with try.
2. To write the clean-up code we can place the finally block. for example-Database closing logic,Stream closing logic or any other resource closing logic which we have opened.
3. This block must be executed irrespective of the Exception in the code.
Finalize:
1. This is the method of Object class and is applicable for all java objects.
2. Before destroying the objects, jvm calls the Garbage Collector and Garbage collector implicitly calls the finalize() method to perform the cleanup activity.