Class NumericLiteralExamples
java.lang.Object
net.jrodolfo.java_evolution.java07.NumericLiteralExamples
Demonstrates binary literals and underscores in numeric literals, introduced
in Java 7.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongUses underscores to group digits in a large numeric literal.intUses a binary literal for bit flags.
-
Constructor Details
-
NumericLiteralExamples
public NumericLiteralExamples()
-
-
Method Details
-
readAndExecuteMask
public int readAndExecuteMask()Uses a binary literal for bit flags.- Returns:
- read and execute permission bits
-
groupedLargeNumber
public long groupedLargeNumber()Uses underscores to group digits in a large numeric literal.- Returns:
- a readable large number
-