I just tried the exumalator's question of the day, and I have a question:
1. char h = 1; //on the line before the System.out.println statement. 2. static char h = 1; //On the line before the System.out.println statement 3. char h = 1;//On the line before the main method 4. static char h = 1;//On the line before the main method
The answer is listed as 1 and 4, which is fine, but I also think 2 is also an option. Can't you put static variables inside a static method?
i agree with Owen.....we cannot have any other variable modifier inside a method. As listed in the rules governing staic declarations in K & B book, I think that anything that is method-local cannot be static.
This looks like a job for .... legal tender! It says so right in this tiny ad: