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
What are the difference between composition and inheritance in java?
How concurrent hashmap works?
Explain 5 features introduced in jdk 1.7?
Write an algorithm for quick sort?
Explain the importance of import keyword in java?
Is java owned by oracle?
Name few java 8 annotations ?
How to compare strings in java?
What is thread pool in java with example?
What are the differences between throw and throws?
What data type is string java?
What happens if we override only equals?
Are arrays static in java?
Why we used break and continue statement in java?
What is object of class in java?