Answer Posted / vijayakumar chinnasamy
No static variable cannot be declared within static/non-
static method.
only "final" and "default" allowed within in method for
variable declaration. i.e u cant use
private,protected,public,static within method .it display
the compile time error "Illegal modifier".
Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
What is the use of java?
What 5 doubled?
What do you understand by classes in java?
What is difference between arraylist and list in java?
What is nested class?
How do you classify Dialog Box?
How many bits is a string in java?
What is sleep method?
Is null false in java?
Explain about sets?
Is string thread safe in java?
Explain with example the concept of constant variable in java.
What is the function of java?
What is java in layman terms?
Why multiple inheritance is not supported by java?