Click here to watch in Youtube :
https://www.youtube.com/watch?v=dD8Uwn2_EmE&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
public class IntegerLiteralDemo { public static void main(String[] args) { int num = 10; System.out.println("num : " + num); num = 010; System.out.println("num : " + num); num = 0x10; System.out.println("num : " + num); num = 0b1010; System.out.println("num : " + num); long number = 599L; System.out.println("number : " + number); } }
num : 10 num : 8 num : 16 num : 10 number : 599
https://sites.google.com/site/javaee4321/java/VariableDemoIntergerLiteralsInJavaApp.zip?attredirects=0&d=1
See also:
No comments:
Post a Comment