IllegalFormatException

  • IllegalFormatException signals an illegal syntax in a format string or incompatibility between the format specifier and arguments.

  • It's an unchecked exception extending IllegalArgumentException and should be instantiated through its explicit subtypes for specific errors.

  • The exception provides methods for retrieving the error message, stack trace, and other related information inherited from its superclasses.

  • Various direct subclasses, like DuplicateFormatFlagsException and IllegalFormatConversionException, address specific formatting issues.

public class IllegalFormatException extends IllegalArgumentException
Known Direct Subclasses

Unchecked exception thrown when a format string contains an illegal syntax or a format specifier that is incompatible with the given arguments. Only explicit subtypes of this exception which correspond to specific errors should be instantiated.

Inherited Method Summary