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 an immutable object? How do you create one in java?
What is the string function?
Difference between keyword and identifier.
Is java code slower than native code?
when you will synchronize a piece of your code? : Java thread
Why isn’t there operator overloading?
Is void a data type in java?
What is final variable?
Explain access specifiers?
How is hashcode calculated in java?
What is the difference between length and size in java?
What is the purpose of javac exe?
Which is better arraylist or vector?
When do we use synchronized methods in java?
What is main method?