Java Byte.toString(byte b)

Syntax

Byte.toString(byte b) has the following syntax.

public static String toString(byte b)

Example

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) {
    //from  w ww  .j a v a  2s.c om
    byte b = 10;
    System.out.println("str:"+Byte.toString(b));

  }
}

The output:





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable