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
What is reflexive association?
Why is stringbuffer thread safe?
How to do encapsulation in java?
What is ternary operator?
Name some OOPS Concepts in Java?
Can we use different return types for methods when overridden?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
Why 1 is not a prime number?
What are the application of stack?
What is percentage in java?
Is singleton set an interval?
What is bigger kb or mb?
Describe 2 different ways to concatenate two strings.
When arithmeticexception is thrown?
What is the difference between a vector & an array list?