• Source
    1. /*
    2.  
    3.  
    4. Date : 14 November 2013
    5. Author : Shivam Tiwari
    6. Organization : http://mycodedock.blogspot.in/
    7. Description : Data-types in Java
    8.  
    9.  
    10. */
    11.  
    12. import java.lang.String;
    13.  
    14. public class Main{
    15. public static void main(String[] args){
    16.  
    17. byte a = 45;
    18. short b = 345;
    19. int c = 56789;
    20. long d = 344456787;
    21. float e = 12;
    22. double f = 23456.8765;
    23. String g = "This is a String";
    24.  
    25. System.out.println("This is a byte : "+a);
    26. System.out.println("This is a short : "+b);
    27. System.out.println("This is an integer : "+c);
    28. System.out.println("This is a long : "+d);
    29. System.out.println("This is a float : "+e);
    30. System.out.println("This is a double : "+f);
    31. System.out.println("This is a String : "+g);
    32. }
    33. }