Skip to main content

Convert Byte object to String object in Java

CODING:
public class ByteToStringExample {
  public static void main(String[] args) {
    Byte bObj = new Byte("10");
    String str = bObj.toString();
    System.out.println("Byte converted to String as " + str);
  }
}

OUTPUT:

Byte converted to String as 10



Comments