What is the use of Final Keyword in java?



Final Keyword is used with class, variable and method.
Syntax:-
final class a
final int x=19;
final void a()
A class can also be declared final. Final class is a class that cannot be used as a super class. In order to declare the class as final simply preceed the class header with final keyword

Comments

Popular posts from this blog

Traversing of elements program with algorithm and Flowchart

Write a program to add two number using inline function in C++?