Click here to watch in Youtube :
https://www.youtube.com/watch?v=104IHkkGZms&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java Integer Literal with underscore |
Java Tutorial : Java Integer Literal with underscore |
public class IntegerLiteralDemo { public static void main(String[] args) { int number = 901_306_555; System.out.println("number : " + number); int octalLiteral = 045_23; System.out.println("octalLiteral : " + octalLiteral); int hexadecimalLiteral = 0x55_21; System.out.println("hexadecimalLiteral : " + hexadecimalLiteral); int binaryLiteral = 0b1000_1001; System.out.println("binaryLiteral : " + binaryLiteral); } }
number : 901306555 octalLiteral : 2387 hexadecimalLiteral : 21793 binaryLiteral : 137
https://sites.google.com/site/javaee4321/java/VariableDemoIntegerLiteralWithUnderScoreApp.zip?attredirects=0&d=1
See also:
java online training
ReplyDeletejava training