Java Byte.toString()
Syntax
Byte.toString() has the following syntax.
public String toString()
Example
In the following code shows how to use Byte.toString() method.
The following two examples is showing how to convert byte value to string value.
public class Main {
public static void main(String[] args) {
Byte byteObject = new Byte("10");
//from w ww. j av a 2 s . c om
String str = byteObject.toString();
System.out.println("str:"+str);
}
}
The outputs: