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

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">