• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When does the JVM Exit?

 
Prasad Tamirisa
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all i came across this question in one of the mock exam of javablackbelt.

can any body suggest whats the answer..??

When does the JVM exit?


1)After the main method returns.



2)After all the non deamon threads created by the application complete.


3)After all the deamon threads created by the application complete.


4)When a thread executes System.exit();


5)When an uncaught exception is thrown in a non demon thread.


6)When an uncaught exception is thrown in a demon thread.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be great practice for the SCJP to write test code for each of these scenarios.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic