APCS Java Subset

ap.java.lang
Class IllegalArgumentException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byap.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

Constructor Summary
IllegalArgumentException()
           
 
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
 

Constructor Detail

IllegalArgumentException

public IllegalArgumentException()

unofficial documentation for the APCS Java Subset