String to Byte Array in Java

By | June 19, 2018

To convert string to byte array in java you can use “getBytes” function. For example:

"your string".getBytes()

String to Byte Array in Java

See image below:

String to byte array in java

How to convert string to byte array in java

That is how to convert string to byte array in java.

In this example i’m using:

Leave a Reply

Your email address will not be published. Required fields are marked *