Thursday, August 11, 2011

Underscores in Binary Literals with Java 7

With Java 7 you can now create binary literals by using 0b prefix. Also, with Java 7 you can split int and long literals using underscores! Let's have a quick short example - underscores in binary literal:

The 0b1111_1111 is a binary literal splitted using underscore in my example. Cool! The NewFileReader class is an example on my other blog entry.

Please see also my other blog entry:
Java 7: Read File Into String

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.