Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|Ans. Final makes sure that the value doesn't change after initialization and static makes sure that there is only one copy that can be shared across objects. |
Making it non static will unnecessarily create a different copy per object wherein the same value will kept for all copies ( as its final and cannot be changed ).
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  java   static   final variables   variable constants basic   frequent|
|When we say final x = 10, is the reference final or the value ?|
|Interface can only have ...|
|What are the conventions regarding constant variables or static final variables ?|
|Which of the following is true ?|
|Which of the following is not true for final variables ?|