PDA

View Full Version : Who knows Java? Help me, pls!



abcdef
02-12-2002, 13:45
I'd like to ask about "garbage collection" in Java. Tell me all you know about it, please. Thanks.

danceswithwolves
03-12-2002, 15:22
instead of asking us, go ahead and read some good books/articles on Java' GC.

nofear
03-12-2002, 20:21
Garbage Collector is a special process to automatically delete the unusable objects. When you create an object with the "new" operator, a reference is kept to access the object. Later on, if you change the reference to another object, hence the old object will be "lost". For example, the following statements create two new object:

String yourName = new String("abcdef"); //create first object
String myName = new String("nofear"); //create second object

if we change the pointer:
myName = yourName;
then the reference myName is overwritten by yourName, so both references now point to the same object and the object that was pointed to myName is 'lost' and you can't get it back.

abcdef
03-12-2002, 21:40
To "nhayvoibaysoi": Ofcourse I've read "Thinking in Java". I don't understand much about it, so I ask you. Which is this forum for? We can't ask here?

abcdef
03-12-2002, 21:40
Thank nofear a lot. This forum still have good people.

danceswithwolves
04-12-2002, 09:33
once you didnt understand GC with a very comprehensive book like "Thinking In Java" (maybe 1st or 2nd edition), i dont think that you can get through it simply with nofear@'s instruction.

and, this room is English room. The more suitable place for your question may be Java room.

well, yes, im some kindz of bad people.

anyway, enjoy practicing English.

abcdef
04-12-2002, 14:19
I don't mean you are bad people, danceswithwolves. With instruction of nofear, ofcourse that's not all, but I now understand more about gc, . This is English or English for IT is either true. So I ask here, I like to read English rather than Vietnamese because some terms we can't translate into Vietnamese.

nofear
05-12-2002, 01:04
Stop all of your serious arguments, please. We are all friends of each other.

danceswithwolves
05-12-2002, 10:38
dont worry nofear@, just that'z something like practicing English.