Two Laptop Bag
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes True/False: Unloaded instances Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "True/False: Unloaded instances" Watch "True/False: Unloaded instances" New topic

True/False: Unloaded instances

Max Vandenburg
Ranch Hand

Joined: Mar 09, 2006
Posts: 51
Any class may be unloaded when none of it's instances and class objects that represent this class are reachable. (T/F?)

The answer is False.

my question is what does it mean by the term "unloaded", can anyone help clarify what it meant with the above statement.

Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
This seems to be referring to class loaders. Class loaders, as far as I know, are not a topic on SCJP.

Where did you find this question?.

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Max Vandenburg
Ranch Hand

Joined: Mar 09, 2006
Posts: 51
Here was the explanation to the statement above:
A class or interface may be unloaded if and only if its class loader is unreachable (the definition of unreachable is given in JLS 12.6.1). Classes loaded by the bootstrap loader are not unloaded.
Sasikanth Malladi
Ranch Hand

Joined: Nov 04, 2000
Posts: 175
I agree. Classloaders are NOT a part of SCJP and this question is off-topic here.
The poster might want to refer elsewhere.
I agree. Here's the link:
subject: True/False: Unloaded instances
It's not a secret anymore!