ap.java.lang
Class IllegalArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ap.java.lang.IllegalArgumentException
- All Implemented Interfaces:
- java.io.Serializable
- public class IllegalArgumentException
- extends java.lang.RuntimeException
Students should understand this error/exception
when it occurs in a program.
According to the Java API,
an object if this class is thrown when a Java method
receives an argument that is "illegal or inappropriate".
For example, in the AP subset, an IllegalArgumentException
might be
thrown if a negative argument is passed to a square-root function.
AB students are expected to be able to throw this exception in code
they write.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IllegalArgumentException
public IllegalArgumentException()