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 difference between conversation & casting?
Can a class be defined inside an interface?
What is the default size of load factor in hashing based collection?
Can we create a constructor in abstract class?
Explain the difference between collection api and stream api in java8?
How do you sort words in java?
What are the advantages of java over C++?
Which class cannot be a subclass in java?
Can you make a constructor final?
How do you create a reference in java?
How do you achieve polymorphism in java?
What 4 doubled?
What is ascii code?
What is independent and dependent variables in research?
What is JDBC Driver interface?How can you retrieve data from the ResultSet