What is the difference between static and non-static
variables?
Answer Posted / santosh mundhe
Static:1)Memory allocated before creation of object.
2)Gets memory on Global segment.
3)Object can't get copy of static variable, each
object shears static variable from global segment.
4)Static variables are not part ob object.
Non-static:
1)Gets memory on satck segment.
2)Object gets copy of non static variable.
3)Non static variables are part of object.
Is This Answer Correct ? | 8 Yes | 7 No |
Post New Answer View All Answers
What is the program compilation process?
How many bytes are there?
What are the different collection views provided by maps?
Can an interface extend a class?
How many bytes is a string?
Is null a value?
define the terminology association.
What’s the difference between the methods sleep() and wait()?
Can you override a final method?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
What are the different http methods?
What are the differences between include directive and include action?
What is navigable map in java?
How do you do math powers in java?
Can we make the abstract methods static in java?