Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to convert byte array to string

ArchanaArchana Member Posts: 1
edited April 2016 in Java
byte[] b = new byte[5];
    b[0] = 97;
    b[1] = -68;
       b[3] = 4;

System.out.println (new String (b, "ISO-8859-1"));

Here, 4 is in ASCII and -68 is having extended ascii char. that 4 is not getting printed any string

Answers

Sign In or Register to comment.