• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Thread Dan Question

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Answers: b,c
Could anyone explain how the answer is. I could guess b. But how come c?
Appreciate ur time and response!
 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well... you see that choice b is a correct answer. Choice c is really a more specific case of b. Choice b could more properly read that "None, some or all of the numbers 0 through 9 could be printed."

The JVM exits when all user threads exit. Daemon threads are non-user threads, and the JVM may exit with them running. In your example choice c could occur if the main thread completes before any of the daemon threads produce output.
reply
    Bookmark Topic Watch Topic
  • New Topic