What is the purpose of declaring a variable as final?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the purpose of declaring a variable as final?
Rating:
In Java, final is a keyword. The value of a variable declared as final remains unchanged in an application. This means that the variable should be initialized at the time of its declaration.
The syntax for declaring a variable as final is given below:
Rating:
Was this information helpful?
Other articles
- What are static methods?
- What is an abstract class?
- What is XML-RPC?
- What is JSR?
- What is a one-to-one relationship?