GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 75 of 502    Print  
Whether a Class,Method can be garbage collected or not?How?

  
Total Answers and Comments: 5 Last Update: June 03, 2008     Asked by: chandu 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 29, 2005 05:51:13   #1  
sarat        

RE: Whether a Class,Method can be garbage collected or...

hi

class is structure method is a part of that one only no one doesnt erase the claass only its instance only.


 
Is this answer useful? Yes | No
October 25, 2005 05:03:30   #2  
Devidas Sonawane        

RE: Whether a Class,Method can be garbage collected or...
Class is a programme means set of instructions and method is part of that class whichever is available in. That's why classes and methods are not garbage collected. but it's instance is garbage collected.
 
Is this answer useful? Yes | No
June 03, 2008 09:36:03   #3  
vinaymudgil007 Member Since: May 2008   Contribution: 43    

RE: Whether a Class,Method can be garbage collected or not?How?
well according to me objects are garbage collected (i mean memory allocated is let free)..... therefore i think methods/classes can't be garbage collected.......

vinny

 
Is this answer useful? Yes | No
June 03, 2008 10:47:27   #4  
sayedcert Member Since: June 2008   Contribution: 2    

RE: Whether a Class,Method can be garbage collected or not?How?
No a Clas Methos cannot be Garbage collected simply because a class or Methoed does not have physical exestence in memory and garbage collector is only used for freeing up the memory which only applies to objects not classes or methods.So only objects can considered for garbage collection not classes or methods..
 
Is this answer useful? Yes | No
June 03, 2008 10:48:39   #5  
sayedcert Member Since: June 2008   Contribution: 2    

RE: Whether a Class,Method can be garbage collected or not?How?
No a Class Method cannot be Garbage collected simply because a class or Method does not have physical exestence in memory and garbage collector is only used for freeing up the memory which only applies to objects not classes or methods.So only objects can considered for garbage collection not classes or methods..
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape