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
How do you check if a character in a string is a digit or letter?
What is the purpose of the file class in java programming?
What is the point of java?
what is collatration?
How to compare strings in java?
What is included in core java?
What is role of void keyword in declaring functions?
How do you sort a string in java?
What are static variables and functions?
What is bean? Where it can be used?
What does the “final” keyword mean in front of a variable? A method? A class?
Can we define a package statement after the import statement in java?
Why does java have two ways to create child threads?
How many types of interfaces are there?
What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?