private static void checkPermission(){
  SecurityManager security=System.getSecurityManager();
  if (security != null)   security.checkPermission(modifyThreadPermission);
}

private static void checkPermission ( ) { SecurityManager security = System . getSecurityManager ( ) ; if ( security != null ) security . checkPermission ( modifyThreadPermission ) ; }
if there is a security manager , makes sure caller has permission to modify threads .
