File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Garbage collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Garbage collection" Watch "Garbage collection" New topic
Author

Garbage collection

Nikitha Reddy
Greenhorn

Joined: Feb 28, 2007
Posts: 12
Hi friends,
I have one doubt.Please clarify my doubt.

class A
{
public static void main(String arg[])
{
B b=new B();
b=null;--> how to restore this object?Is there any method to restore this object?
}
}
class B
{
int i;
B()
{
i=10;
}
}
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

how to restore this object?Is there any method to restore this object?


Do you mean to reassign it to the original object ? The answer is no, unless you have another reference that points to that object.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Garbage collection