Back to Intellij Community

SuspiciousLiteralUnderscore

java/java-impl/resources/inspectionDescriptions/SuspiciousLiteralUnderscore.html

2025.3-rc-2384 B
Original Source

Reports decimal number literals that use the underscore numeric separator with groups where the number of digits is not three. Such literals may contain a typo.

This inspection will not warn on literals containing two consecutive underscores. It is also allowed to omit underscores in the fractional part of double and float literals.

Example: int oneMillion = 1_000_0000;