Starting from JDK7 you are allowed to put underscores between the digits number in primitives initialization step.In goal of increasing the readability of your java source code, at Java7 you can add underscore between the digits numbers for example:
long cardNumber = 3234_5431_6441_9876L; double mydouble=323_123_3d; Integer integer=32_43;
There are places that you have to be careful about putting underscore there:
Before the Suffix (L or D).
At the start or end of a number.
Place of String of digits is required.
Before or after the floating point.
Example of a wrong usage for underscore with numbers assignment:
float fnumber = 53_.32F; long VisaCard= 1111_1111_1111_L; int intNum = _12;
_________________ M. S. Rakha, Ph.D. Queen's University Canada