What is the difference between static and non-static
variables?
Answer Posted / sathya
Static variables:
There is only one copy of static variable and even
when the class is instatiated, the value remains the same.
Non-static variables:
Every time the class is instatiated, the objest has
their own copy of these variables.
Is This Answer Correct ? | 72 Yes | 13 No |
Post New Answer View All Answers
What invokes a thread's run() method in java programming?
What are variable names?
How do you convert an int to a string in java?
What does this () mean in constructor chaining concept?
What is outofmemoryerror in java?
is there a separate stack for each thread in java? : Java thread
Can you run java program without main method?
Can we have try without catch block?
What is consumer in java?
design an lru cache in java?
What if static is removed from main method?
What does 3 dots mean in java?
What are the states of thread in java?
What is a control variable example?
What is tcp and udp?