convert string to byte java code example
Example 1: convert string to byte java
String example = "Convert Java String";
byte[] bytes = example.getBytes();
Example 2: String by byte array in java
String str = "Example String";
byte[] b = str.getBytes();