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
what is instanceof operator used in java?
How do you sort in descending order in java using collections sort?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
What is object in java?
what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread
What is strings in java?
How do you insert a line break?
Describe method overriding
What is the java project architecture?
What are the pillars of java?
Can a static block throw exception?
What is the lifetime and scope of a variable?
Which sorting algorithm is best in java?
Can we have static methods in an interface?
What are the loops in java?