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 the purpose of format function?
Is ++ operator thread-safe in java?
What super () does in java?
What is meant by oops concept in java?
What is the difference between yield() and sleep()?
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
If you are given the name of the function at run time how will you invoke the function?
What is derived datatype?
What is initial size of arraylist in java?
Explain the use of shift operator in java. Can you give some examples?
Explain the difference between map and flatmap stream operation?
java Technical questions asked by JPMC
What is the java idl system?
Explain java coding standards for constants?
Are static members inherited to sub classes?