Name
IllegalAccessException
Synopsis
This exception signals that a class has attempted to perform an operation
on an object which it does not have access. This typically occurs when
an attempt is made to create an instance of a class using the
Class
newInstance()
method and
the executing code does not have access to the no-argument constructor,
even though it has access to the class itself.
This class is the same as its J2SE equivalent, apart from its inability to be
serialized.
public class IllegalAccessException extends Exception { // Public Constructors public IllegalAccessException(); public IllegalAccessException( String s); }
Thrown By
Class.newInstance()
Get J2ME in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.