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 will be the initial value of an object reference which is defined as an instance variable?
Write a function for palindrome and factorial and explain?
What is prefix of a string?
what is daemon thread and which method is used to create the daemon thread? : Java thread
when you will synchronize a piece of your code? : Java thread
What is class level lock ?
Can a serialized object be transferred via network?
How do you write a good declaration?
What is the difference between dom and sax parser in java?
What does @override mean?
What is the purpose of format function?
What does string [] args mean?
What is meant by stack and queue?
What is string pool?
What is sortedmap in java?