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
How to check if a list is sorted in java?
What is string value?
What do you mean by hashing?
why we use merge option in hybernate pls give a ex snippet
How variables are stored in memory?
Do you know why doesn't the java library use a randomized version of quicksort?
What is api data?
How to sort array in descending order in java?
What is lazy initialization in java?
What does ide stand for?
What is the purpose of static methods and variables?
Why do we need wrapper class?
Why java is called not pure object oriented language?
What are keyboard events?
Why java is used everywhere?