why we cannot declare static variable inside a static method
Answer Posted / swamireddy
STATIC VARIABLES ARE DECLARED CLASS DIFINITION ONLY
WITHOUT DECLARE THE WITHIN STATIC METHODS.THE STATIC
METHODS ARE ONLY USE THE STATIC VARIABLES.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Can a class with private constructor be extended?
How do you start a new line in java?
What is gc()?
Explain about static imports in java?
What is the method to declare member of a class static?
What is a vararg?
What is final keyword?
Explain the difference between the public, private, final, protected, and default modifiers?
What is anti pattern in java?
Can we override a variable in java?
Explain different types of wrapper classes in java?
Are strings immutable in java?
What is exception propagation?
What is the maximum length of a url?
What is getclass () getname () in java?