Convert byte to String



This example shows three ways of converting a variable of datatype byte to a String.
The first example uses the wrapper class Byte and it’s static method toString to convert the byte.
The second example just concatenates the byte with an empty String, and the value is automatically casted to a String.
The final example creates a byte array which is passed to the constructor of the String class.

The output of the code below is:

Where you looking to convert byte array to String?







Search for more Java info on this site here:
Custom Search


Any thoughts or questions?