Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IBM Sample Question

 
Allan Tan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With respect to User and Daemon threads:





This one is from IBM: which of the following are true?
a) Daemon threads can not be grouped together
b) The JVM can terminate program when only daemon threads are running
c) Running Daemon threads prevent a Java VM from terminating program
d) Running User threads prevent a JVM from terminating program

Needed help...
 
Udayan Naik
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion , b) and d) are the correct answers.
a) Daemon threads can not be grouped together - FALSE.You can always create a new Thread that belongs to a particular ThreadGroup and call the setDaemon() method on that thread.
b) The JVM can terminate program when only daemon threads are running - TRUE.
c) Running Daemon threads prevent a Java VM from terminating program - FALSE.
d) Running User threads prevent a JVM from terminating program -TRUE.


------------------
Come on in !! Drinks are on the house in the Big Moose Saloon !!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic