The largest Interview Solution Library on the web


java tutorials/
« Previous | 1 | 2 | 3 | Next »

Example Privileged Code


  • Must use java.security.PrivilegedAction interface

  • The run() method contains code needing privilege

  • AccessController.doPrivileged()

  • Takes PrivilegedAction object argument

  • Invokes its run() method

  • Returns the run() method's return value
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com