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 are design patterns and please explain?
What is the use of pattern in java?
What is singleton pattern?
What does 0 mean in boolean?
What are java methods?
What is jvm? How its run?
Why does java have different data types for integers and floating-point values?
What is sizeof () operator?
Differentiate between stringbuffer and string?
How do you create a reference in java?
What is a java predicate?
Difference between java and javascript
How do you remove duplicates from an array in java?
What is the main difference between java platform and other platforms?
What is foreach loop in java?