How to convert Byte Array to String in java

Sometimes, we may need to convert String to bytes Array but how to convert bytes array to String back.

toString method does not work correctly here as it just print bytes in String format.

You can use String’s constructor to get String back.


When you run above program, you will get below output:

Add Comment