#

| Chapter 25 The java.lang Package |

## 25.23 java.lang.IllegalAccessException (JDK 1.0)

###

Signals that a class or initializer is not accessible. Thrown by `Class.newInstance()`.

    public class IllegalAccessException extends Exception {
        // Public Constructors
                public IllegalAccessException();
                public IllegalAccessException(String s);
    }

### Hierarchy:

Object->Throwable(Serializable)->Exception->IllegalAccessException

### Thrown By:

Class.newInstance(), Constructor.newInstance(), Field.get(), Field.getBoolean(), Field.getByte(), Field.getChar(), Field.getDouble(), Field.getFloat(), Field.getInt(), Field.getLong(), Field.getShort(), Field.set(), Field.setBoolean(), Field.setByte(), Field.setChar(), Field.setDouble(), Field.setFloat(), Field.setInt(), Field.setLong(), Field.setShort(), Method.invoke()

java.lang.IllegalAccessError (JDK 1.0) |  | java.lang.IllegalArgumentException (JDK 1.0)