Monday, 28 September 2015

Java Tutorial : Java Integer Literal with underscore


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
IntegerLiteralDemo.java
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);

    }
}
Output
number : 901306555
octalLiteral : 2387
hexadecimalLiteral : 21793
binaryLiteral : 137
To Download VariableDemoIntegerLiteralWithUnderScoreApp Project Click the below link
https://sites.google.com/site/javaee4321/java/VariableDemoIntegerLiteralWithUnderScoreApp.zip?attredirects=0&d=1

See also:

  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • No comments:

    Post a Comment

    Google+ Followers

    Google+ Badge