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
In how many ways we can do exception handling in java?
Why null value is used in string?
Name few "optional" classes introduced with java 8 ?
What is the difference between jdk, jre, and jvm?
How we can declare a static variable?
What is collections framework?
What are parsers? Dom vs sax parser.
State the merge-sort principle and its time complexity.
What is a function in java?
What is the difference between hashset and treeset in java?
What is an enumeration?
What java is used for?
What are the rules for naming an array?
Can we have try without catch block?
Explain the meaning of java applet.