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
Explain importance of inheritance in java?
Can a set contain duplicates?
Why do you canvas?
What’s the difference between callable and runnable?
Have you ever used hashtable and dictionary?
Which graphs are functions?
What is the basic of java?
How to perform selection sort in java?
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?
Can a source file contain more than one class declaration?
What is method and methodology?
How do you reverse sort in java?
What is integer parseint?
how to prepare for IT Officers Interview in Banks
Differentiate between a class and an object.