Byte to Char in Java

I have a "byte" ,no array nothing , just a byte. How can i convert it to char or string so that the time when i use it in system.out.println it should give the character that have been sent and not the ascii . Its basically for the java part of the JNI .
[261 byte] By [AmitKumar_Embeddeda] at [2007-11-26 13:10:34]
# 1

> I have a "byte" ,no array nothing , just a byte. How

> can i convert it to char or string

String.valueOf(theByte)

os similar methods from the respective wrapper classes.

> so that the time

> when i use it in system.out.println it should give

> the character that have been sent and not the ascii .

bytes are not characters. chars have two bytes. Hence out will print a number.

CeciNEstPasUnProgrammeura at 2007-7-7 17:24:57 > top of Java-index,Java Essentials,Java Programming...
# 2
byte theByte = 41;char ch = (char)theByte;Kaj
kajbja at 2007-7-7 17:24:57 > top of Java-index,Java Essentials,Java Programming...
# 3
Thanks Kaj . Ur method worked .
AmitKumar_Embeddeda at 2007-7-7 17:24:57 > top of Java-index,Java Essentials,Java Programming...