Can a final variable be initialized in constructor?
Answer / Prabal Chatterjee
Yes, you can initialize a final variable in a constructor. However, once the variable is initialized, it cannot be reassigned.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?
How are variables stored in memory?
can we Connect Applet to Data Base ? with Discriptiom. and also What is Diff. from Applet & Servlet?
What is final int?
What is the base class for error and exception?
What is the benefit of abstract class?
Is cout buffered?
What is java in detail?
what is ABSTRACTION and what are using in real time project?
Which is better arraylist or vector?
What is the benefit of using enum to declare a constant?
What is a singleton in genetics?