• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JVM

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When does the JVM exit?
1.After the main method returns.
2.After all the non demons threads created by the application complete.
3.After all the demon 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
Answers mentioned are (2) & (4).How about (5)&(6) too ?
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eventhough the uncaught exception( this has to be an unchecked exception, ) results in thread death, there may be other non-daemon( ie., user ) threads running in which case the JVM will continue to run.
Ajith
 
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic