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 |
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); } }
longValue : 100 decVal : 26 hexVal : 26 binVal : 26
https://sites.google.com/site/javaee4321/java/VariableDemoIntegerLiteralsApp.zip?attredirects=0&d=1
See also:
No comments:
Post a Comment