| Author |
static final variable initialization
|
Naseem Khan
Ranch Hand
Joined: Apr 25, 2005
Posts: 809
|
|
Above code compiles fine giving output 0 at runtime. Why above code is not giving compilation error at line 4. i is not initialized upto that point. i is initialized at line 5. ---------------------------------------------------------- Can anyone find the problem in this code. Regards Naseem
|
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
|
For your second question see this topic I posted a week or so ago in Java In General (Intermediate)
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
 |
|
|
subject: static final variable initialization
|
|
|