Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

Hexadecimal Literals
Hexa decimal number is bassiclaly stands for in short Hex. Its only constructed using 16 distrinct symbols . becouse 10 to 15 numbers have a alphabatic charectors to represent these digits. Hexadecimal counting from 0 to 15 looks like : 
> 0
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> a
> b
> c
> d
> e
> f
       all of the hexa decimal assignments are legal  : 
      class HexTest {
public static void main (String [] args) {
int x = 0X0001;
int y = 0x7fffffff;
int z = 0xDeadCafe;
System.out.println("x = " + x + " y = " + y + " z = " + z);
}
}
 Running HexTest produces the following output : 
 x = 1.
 y = 2147483647. 
 z = -559035650.
Posted By: Name:Rajesh Kr URL: Hexadecimal Literals