import java.lang.*; public class java17_test extends SecurityManager{ /** * @param args */ public static void main(String[] args) { System.setSecurityManager(new securityHouse()); System.exit(1); } } class securityHouse extends SecurityManager{ public void house(){ checkExit(1); } }
I expected to get a SecurityException as soona as I invoked the System.exit(1) method but I failed to get one..
Is my logic right?