What have you tried? And how did it not work? My last post should give you something close, which you can work out.
A Agr wrote:
Also in java it is signed byte whose upper limit is 127 so how can I deal with hexadecimal nos greater than 127 ?
Seriously, it is possible to treat signed numbers as unsigned numbers, provided that you shift (or cast) it correctly. Hexidecimal literals can be both signed or unsigned -- so if you assign 0xFF into a byte, the compiler will not complain, and knows that you want it unsigned.
It can't print that byte though, as the print mechanism doesn't know that it is unsigned. To do that you need to cast it and AND it, to something bigger before you can print it. Assuming "b" is a byte...
short s = ((short) b) & 0xFF;
Now you can print s, which contains the value of b, if it was unsigned.