Answer Posted / ali
No Static Variable cannot declare in method.
but the method present in class can access the static variable
of class.
Or the method which is trying to access the static variable of
class but method is not part of that class at that time declare method as static then it can access that static variable.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
which class is the wait() method defined in? : Java thread
Why is a constant variable important?
What is the difference between quicksort & mergesort? When should they be used? What is their running time?
Can a static method be final?
Can an unreferenced object be referenced again?
What is parseint?
What flag up means?
What is the difference between the prefix and postfix forms of the ++ operator?
What is qms certification?
What is the difference between I ++ and ++ I in java?
Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example
Which is better singleton or static class?
What is the differences between c++ and java? Explain
What are the two ways of implementing multi-threading in java?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?