package com.basics;
/*
*
* Runtime.getRuntime.exit() and System.exit() method to terminate the CURRENTLY RUNNING JVM
* where non-zero status code is ABNORMAL TERMINATION?????????????
*/
public class JVMTerminationExample {
public static void main(String args[]) {
System.out.println("I this a daemon thread........"+Thread.currentThread().isDaemon());
// Thread.currentThread().setDaemon(true);
System.exit(1);
// Runtime.getRuntime().exit(0);
System.out.println("After system exit............"+Thread.currentThread().isAlive());
}
}
No comments:
Post a Comment