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.
|Interview Questions and Answers|
|Ans. Objective of constant variable is to provide a context to the value and provide a single point of change. In terms of context, i don't see much need for having constant name for null as null is already self explanatory. In terms of providing single point of change, it doesn't make much sense as it would necessitate that all such placeholders either hold null or a common value. |
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  constant variables  static final variable  java conventions  java naming conventions|
|What are the conventions regarding constant variables or static final variables ?|
|What is the advantage of using static final or constant variables in Java ?|
| If we have to maintain a value "7" denoting "number of days in a week" as constant variable, Which of the following is the best constant name and Why ?|
| If we have to maintain a value "31" denoting "number of days in a month" as constant variable, Which of the following is the best constant name and Why ?|
|How do we define constant variables in Java ?|