What is static variable and static method?
Answer Posted / govardhani
A static variable is a variable who's single copy in memory
is shared by all objects,so any modifications to the static
variable will modify it's value in all objects.
In classes, a static method is one that is called without an
instance of that class, while a non-static method is called
by instances of the class.
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of using javap?
What is object class in java?
What are the difference between string, string builder, and string buffer in java?
List some java keywords sun like c, c + + keywords?
What are different exception types exceptions available in java ?
What are multiple inheritances? Is it supported by java?
What happens if main method is not static?
What is ternary operator? Give an example.
How do generics work?
Can a lock be acquired on a class in java programming?
What is output buffer?
What is the advantage of functional interface in java 8?
What is final method?
Why is java architectural neutral?
Is null an object java?