• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what happens to objects if the class does not exist

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

In Interview I have been asked as "if the java class doesn't exist what happens to the objects"

Kindly clarify me the answer,

What I thought is class has objects so its has a association so objects will be still there on the heap,

Kindly reply,
Uju
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you ask when the class ceased to exist?
What do you think happens? What did you say?
 
ujwwala tem
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Campbell,

What I answered is objects will not exist if the class is unloaded by classloader,but still I am confused,

but logically now what I am thinking is they will reside on the heap, Please clarify my doubt,

Regards,
Uju
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic