Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Valentin's, Question 4

 
Steve Lovelace
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question wants the following answer to be checked true:
The garbage collection thread cannot outlive the last user thread.
As I understand things, it will ALWAYS outlive the last user thread (though only by a hair). This is actually implied by the opening lines of the explanation to the question
The garbage collection thread is a deamon thread. The latter die when there are no more users threads running.
In other words, they die AFTER the last user thread dies.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for pointing this out. You get credit for this one
I have changed the option to be
The garbage collection thread will die just after the last user thread dies.
I hope this clears your doubt.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!