This is my blog about Java, and Android software development. All the sample source code here are hosted at Kenai.com
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.