Format Specifiers: Format_Character
This lesson explains the format_character, which is a part of formatted output.
We'll cover the following
format_character #
The following format characters are used in the wrtiefln()
function:
-
b
: an integer argument is displayed in the binary system. -
o
: an integer argument is displayed in the octal system. -
x
andX
: an integer argument is displayed in the hexadecimal system; with lowercase letters when usingx
and with uppercase letters when usingX
. -
d
: an integer argument is displayed in the decimal system; a negative sign is also displayed if it is a signed type and the value is less than zero.
Get hands-on with 1400+ tech skills courses.