Yes, System.exit takes –ve
value, As you see the documentation of System .exit, the signature looks like
below.
public static void exit(int status); public class Test { public static void main(String ptr[]) { System.out.println("I am displaying"); System.exit(-100); System.out.println("I am not displaying"); } }
Output
I am displaying
You may like
No comments:
Post a Comment