Answer Posted / aravinda reddy
No we can't declare a static variable in a method or static
method, static variables are class level variables. Static
means one per class as per OO rules and method level
variables scope is with in the method. So if java allows
static variable inside a method, static concept is useless.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Can we declare a constructor as final?
What is logical variable?
What are singleton services?
How many bytes is double?
What is a programming object?
When throw keyword is used?
Is a string literal?
Mention the default values of all the elements of an array defined as an instance variable.
Can we serialize singleton class?
What is the r character?
What is meant by null and void?
What is the structure of java?
Can you extend singleton class?
What is ordered map in java?
How do you define a singleton class?