Answer Posted / venkatesh
No we can't declare a static variable in a method.
only final and default scope variables are allowed inside
the method
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
Differentiate between postfix and prefix operators in java.
What do you mean by pointer value and address?
Can we rethrow the same exception from catch handler?
What happens to a static var that is defined within a method of a class?
Which is the class in java?
How do you remove all elements from an arraylist in java?
How many threads can java run?
How do you check whether the list is empty or not in java?
What is a instance variable in java?
I want to print “hello” even before main is executed. How will you acheive that?
How do you check if an arraylist is not empty?
What does java stand for?
Can array grow dynamically in java?
What are the types of java languages?
Can we use both this () and super () in a constructor?