In [ ]:
import java.util.Arrays
String to Byte Array¶
In [4]:
byte[] bytes = "how are you".getBytes();
for(byte b : bytes){
System.out.println(b);
}
Out[4]:
Byte Array to String¶
In [5]:
byte[] bytes = "how are you".getBytes();
System.out.println(new String(bytes));
Out[5]:
In [ ]: