Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
import java.util.ArraysString to Byte Array¶
byte[] bytes = "how are you".getBytes();
for(byte b : bytes){
System.out.println(b);
}104
111
119
32
97
114
101
32
121
111
117
nullByte Array to String¶
byte[] bytes = "how are you".getBytes();
System.out.println(new String(bytes));how are you
null