Hi Sunita
The hexadecimal representation is for the convenience of the
programmer for assignment and output. Internally ints are stored as bytes (binary). Two things on changing the representation:
int i = 0xFF;
System.out.println(i);
This will display the int as a decimal.
The wrapper class java.lang.Integer offers a few conversion methods (mostly static) that allow you to output the Integer in any of the representations returning a
string.
int i = 10;
String s = new String(Integer.toHexString(i));
System.out.println(s);
Finally you can parse an int from a string giving the radix you want to use:
int j = Integer.parseInt("FF", 16);
System.out.println(j);
//output is 255
Just write some code with the java.lang.Integer class and find
out about all the representations.
Hope this will help
Regards
Jakob