Byte toString(byte b)
converts byte to Byte.
toString
has the following syntax.
public static String toString(byte b)
toString
has the following parameters.
toString
returns
the string representation of the specified byte
In the following code shows how to use Byte.toString(byte b) method.
The code below calls the static method to do the conversion.
public class Main { public static void main(String[] args) { byte b = 10; System.out.println("str:"+Byte.toString(b)); } }
The output: