What are the specifiers for Java Formatter class?

The following table shows the format specifiers:

Format Specifier Conversion Applied
%a %A Floating-point hexadecimal
%b %B Boolean
%c Character
%d Decimal integer
%h %H Hash code of the argument
%e %E Scientific notation
%f Decimal floating-point
%g %G Uses %e or %f, whichever is shorter
%o Octal integer
%n Inserts a newline character
%s %S String
%t %T Time and date
%x %X Integer hexadecimal
%% Inserts a % sign

If the argument doesn’t match the type-checks, an IllegalFormatException is thrown.