final
class cannot be inheritedfinal
method cannot be overriddenfinal
variable value cannot be changed
Java finally
block is a block that is used to execute important code such as closing connection, stream etc. It is always executed whether exception is handled or not. Java finally block follows try or catch block.
The java.lang.Object.finalize()
is called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.
Java passes the references by value Java manipulates objects by reference, but it passes object references to methods by value
For more info see here