import java.util.Arrays;
public class test {
public static void main(String[] args) {
// String 转 byte[]
String str = "java.lang.UNIXProcess";
byte[] b = str.getBytes();
System.out.println(Arrays.toString(b));
}
}
public class test {
public static void main(String[] args) {
// byte[] 转 String
byte[] b = new byte[]{106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 85, 78, 73, 88, 80, 114, 111, 99, 101, 115, 115};
String s = new String(b);
System.out.println(s);
}
}