Inspectopedia Help

Octal integer

Reports octal integer literals. Some coding standards prohibit the use of octal literals, as they may be easily confused with decimal literals.

Example:

int i = 015; int j = 0_777;

This inspection has two different quick-fixes. After the Convert octal literal to decimal literal quick-fix is applied, the code changes to:

int i = 13; int j = 511;

After the Remove leading zero to make decimal quick-fix is applied, the code changes to:

int i = 15; int j = 777;

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023