what is the working of JVM when An object is created of a class?
When the JVM creates the instance of your class object,the object instance is stored in the heap.The non-demon thread executes your methods inside your object instance and finally the non-demon thread is destoryed and the jvm instance is also ended.
Ads