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
Lowest Common ancestor in a Binary Search Tree and Binary Tree.
What is a ?
What are wrapped classes in java programming?
Can you have two constructors in java?
Can we have multiple classes in a single file?
What is heterogeneous in java?
Can this keyword be used to refer static members?
Explain different ways of creating a thread?
how to handle exceptions in ejb?
What do you mean by object?
Can we increase array size dynamically in java?
What is polymorphism java example?
what is object-oriented programming in java?
What is the default size of arraylist in java?
What is string :: npos?