What is static variable and static method?
Answer Posted / aravind
a variable declared inside a method is local to that method.
it can't be accessed outside the method. if a variable
declared in a class means its a global variable.if we
declare a variable with static keyword in a class means it
can be accessed by all the class.
| Is This Answer Correct ? | 18 Yes | 22 No |
Post New Answer View All Answers
Why does my function print none?
Why Java doesn’t support multiple inheritance?
Why does java not support pointers?
Can we inherit inner class?
Explain the difference between abstraction and encapsulation.
What is difference between string and new string?
Is java a compiler?
What is better - 'bit-shift a value' or 'multiply by 2'?
Can we assign integer value to char in java?
What is a line break?
Can You Have Virtual Functions In Java?
What are latest features introduced with java 8?
What is a method header?
What is the public method modifier?
Can a variable be local and static at the same time?