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 and X: an integer argument is displayed in the hexadecimal system; with lowercase letters when using x and with uppercase letters when using X.

  • 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.