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 constructor chaining in java?
Can java list be null?
What is the difference amongst jvm spec, jvm implementation, jvm runtime ?
Can string be considered as a keyword?
What do you mean by formatting?
How to perform binary search in java?
What is module with example?
What happens if an exception is throws from an object's destructor?
What is array length?
How do I know if java is installed?
How can you make a class serializable in java?
How to declare an arraylist in java?
What are the benefits of operations in java?
If you do not want your class to be inherited by any other class. What would you do?
What is square root in java?