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
Are static members inherited to sub classes?
How do you override a private method in java?
What is the difference between an inner class and a sub-class?
What is merge sort in java?
What are the main differences between notify and notifyAll in Java?
How can we make a class singleton?
What is an argument in java?
What is the difference between yielding and sleeping?
What is java virtual machine and how it is considered in context of java’s platform independent feature?
What do you mean by chromounits in java8?
What is a percentage sign called?
What is Gang of four design patterns
How do you define a set in java?
What is a java applet? What is an interface?
What are the differences between graph and tree?