Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (45k points)

Could someone tell me what is the use of the final keyword in Java?

1 Answer

0 votes
by (99k points)

A final keyword in Java could be defined as a variable that will be constant and cannot be changed. That means that value is final. For example, the value of Pi is 3.14…..This is used to restrict any alteration with that value. Final in Java could be applied in several contexts, like variable, method, and class, etc. If these are made final, then you cannot change the value of a variable, override a method, or extend the class.

Wish to learn Java and enhance your job opportunities? Check out the Java training course from Intellipaat. Also, watch the following video on Java for Beginners and get started.

Related questions

0 votes
2 answers
asked Mar 29, 2021 in Java by dev_sk2311 (45k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...