Monday, 28 September 2015

Java Tutorial : Java Integer Literals


Click here to watch in Youtube :
https://www.youtube.com/watch?v=6GriFQkmhB4&list=UUhwKlOVR041tngjerWxVccw

Click the below Image to Enlarge
Java Tutorial : Java Integer Literals
Java Tutorial : Java Integer Literals



Java Tutorial : Java Integer Literals 
IntegerLiteralDemo.java
public class IntegerLiteralDemo
{

    public static void main(String[] args)
    {

        long longValue = 100L;

        System.out.println("longValue : " + longValue);

        // The number 26, in decimal
        int decVal = 26;

        System.out.println("decVal : " + decVal);

        // The number 26, in hexadecimal
        int hexVal = 0x1a;

        System.out.println("hexVal : " + hexVal);

        // The number 26, in binary
        int binVal = 0b11010;

        System.out.println("binVal : " + binVal);

    }
}
Output
longValue : 100
decVal : 26
hexVal : 26
binVal : 26
To Download VariableDemoIntegerLiteralsApp Project Click the below link
https://sites.google.com/site/javaee4321/java/VariableDemoIntegerLiteralsApp.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