Does a final variable initialized in overloaded constructors differently. Then what about the necessity of intializing a variable at the declartion?
Joined: Aug 15, 2006
we can only initialize final variables once.
Joined: Aug 16, 2006
Do it. final can't be reintialized
Joined: Jan 30, 2000
I'm not sure what these guys are celebrating with their . But to answer the question in a useful way, there is no requirement to initialize a final variable at declaration. For an instance variable, the requirement is that it needs to be assigned before the constructor completes. If you want t assign a final variable in a constructor, you must not assign it at declaration, since a final variable may be assigned only once. vijayk, does that answer your question?
"I'm not back." - Bill Harding, Twister
Joined: Jul 28, 2006
Hmmm... Your first sentense no verb.
Anyway, don't forget to assign a value in *every* constructor: