Integer Literals >
Integer literal is of type long if it ends with the L or l, otherwise it is int type.
int literals can be used to create values of the byte, short, int, and long types.
Integer literals can be expressed by these number systems:
- Decimal (Base 10) - digits between 0 through 9
- Hexadecimal (Base 16) - digits between 0 to 9 & letters between A to F
- Binary (Base 2) in java 7 - digits 0 and 1.
Read full article from JavaMadeSoEasy.com: Primitive, Custom/reference Data Types, Integer, Floating-Point, Character and String literal, Escape sequence in java, decimal to hexaDecimal and binary conversion program, Implic
No comments:
Post a Comment