What does the following codes do?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpuser123
    New Member
    • Dec 2009
    • 108

    What does the following codes do?

    import java.lang.*;
    public class java17_test extends SecurityManager {

    /**
    * @param args
    */
    public static void main(String[] args) {


    System.setSecur ityManager(new securityHouse() );
    System.exit(1);

    }

    }


    class securityHouse extends SecurityManager {
    public void house(){
    checkExit(1);

    }
    }


    I expected to get a SecurityExcepti on as soona as I invoked the System.exit(1) method but I failed to get one..
    Is my logic right and are my codes meaningful?
Working...