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
What is a conditional statement explain with example?
How many bytes are there?
What is data object example?
What are the two ways to create a thread?
What is a null check?
What is bytecode verifier?
What is the purpose of declaring a variable as final?
What are the 4 types of research methods?
Give any two differences between C++ and java.
What is the difference between preemptive scheduling and time slicing?
Why do we use threads in java?
Can we use String with switch case?
Why singleton class is used in java?
Why for each loop is used?
What are the differences between heap and stack memory?