Am I using the SecurityManager class welll?

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

    #1

    Am I using the SecurityManager class welll?

    Code:
    public void test1(){
    		SecurityManager s=System.getSecurityManager();
    		if (s!=null){
    			s.checkExit(1);
    		}
    		
    		System.exit(1);
    	
    	}
    I want to get a SecurityExcepti on when invoke the method...Since the method has aleady a System.exit(1), why am not getting the exception here..
    Am i using this class correctly if not plllz guide me ?


    Thanks in adv
    Last edited by Niheel; Jul 14 '10, 04:04 PM. Reason: display code in code tags
Working...