jav string to byte code example Example: convert string to byte java String example = "Convert Java String"; byte[] bytes = example.getBytes();