CodeGym /Courses /New Java Syntax /Garbage collection

Garbage collection

New Java Syntax
Level 16 , Lesson 1
Available
Garbage collection - 1 "Greetings, Amigo, my dear student. I'm glad to see you here at the library. I want to ask you something important: what do you think of Garbage Collectors?"

"Oh… Professor, you know… I guess it could be my cup of tea if I were to stop learning how to program…"

"Ha! Amigo, sometimes you're really funny. However, this is a serious question and I'm talking about Java."

"Well, I have to admit I know nothing about the topic, sorry…"

"No worries, Amigo. That's okay for a CodeGym 6th grader. I have a useful article for you. It's called Object lifecycle. Please read it. You’ll find out how garbage collection works."

Comments (8)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Ishika Paul Level 8, Bangalore, India
4 October 2020
It's better to remove the Object.finalize() example since it's no longer in use. It's confusing for beginners when they expect a result to work and doesn't find it running properly.
Agent Smith Level 38
13 August 2020
Who will collect garbage? There are only two options...

String garbage-collector = (Me.studyJava()) ? "java" : "me";
Daisy Level 8, San Jose
31 May 2021
🤣🤣🤣
AleCacique Level 9, Orlando, Estados Unidos
5 September 2022
jaja,nice one!
Sidd Level 7, Maple Valley, United States
4 June 2020
Never knew I was studying java to learn about garbage collection.
Ellerina Level 7
3 May 2020
6 points out for small talk with the professor. Hmmm.. :-)
Cristian Level 16, Bucharest, Romania
22 October 2019
Okay!
John Michael Montuya Level 10, Cebu City, Philippines
23 May 2019
Owrayt!!!