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 do you understand by abstract classes?
What is the same as procedures?
How do listeners work?
Explain the difference between collection api and stream api in java8?
What is adapter in java?
What are different access specifiers in java? Explain
How will you load a specific locale?
What is collection class in java?
Can a serialized object be transferred via network?
Define the term string pool?
How do you test a method for an exception using junit?
Difference between arraylist and vector.
What are the parts of a method?
what is nested class in java?
What are the advantages of defining packages in java?