implements PrivilegedAction : PrivilegedAction « java.security « Java by API






implements PrivilegedAction

  


import java.io.File;
import java.security.PrivilegedAction;

class CountFilesAction implements PrivilegedAction {
  public Object run() {
    File f = new File(File.separatorChar + "files");
    File[] fArray = f.listFiles();
    return new Integer(fArray.length);
  }
}

   
    
  








Related examples in the same category