Example & Tutorial understanding programming in easy ways.

15.point to be remember keyword final.

Points to be Remember:

a) A final method cannot be overridden.

b) A final class not be inherited.

c) We cannot change the value of a final variable.

d) A constructor cannot be declared as final.

e) Local final variable must be initializing during declaration.

f) All variables declared in an interface are by default final.

g) If method parameters are declared final then the value of these parameters cannot be changed.

h) It is a good practice to name final variable in all CAPS.

i) final, finally and finalize are three different terms. finally is used in exception handling and finalize is a method that is called by JVM during garbage collection.

Read More →
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!