Development Java Tutorial

Format Specifier Conversion Applied
%a and %AFloating-point hexadecimal
%bBoolean
%B
%cCharacter
%C
%dDecimal integer
%hHash code of the argument
%H
%eScientific notation
%E
%fDecimal floating point
%gUses %e or %f, whichever is shorter
%G
%oOctal integer
%nInserts a newline character
%sString
%S
%tTime and date
%T
%xInteger hexadecimal
%%Inserts a % sign