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
Why string is immutable or final in java
Is string is a class in java?
What is data structure in java?
What is %d in printf?
Can you sort a string in java?
What is length in java?
Why stringbuilder is not thread safe in java?
What is a generic code?
What does nullpointerexception mean?
What is the use of hashmap in java?
What is difference between an object and a class?
Explain how can you debug the Java code?
Can an interface have a class?
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
Give me example of derived data types.