0

How to use underscore in numeric literals?

Share:

Writing a long sequence of numbers in a code is a hard stuff to read. In the new feature introduced by JDK 7 we are now allowed to write numeric literals using the underscore character to break the numbers to make it easier to read.

You can see how to use underscore in numeric literals in the following examples. And you’ll see it for your self that it really makes numbers easier to read.

Filed in: Java Basic

Leave a Reply

Submit Comment

© 2014 Java Examples - Developed with