Convert Byte object to String object - Java Language Basics

Java examples for Language Basics:byte

Description

Convert Byte object to String object

Demo Code


 
public class Main {
 
  public static void main(String[] args) {
    Byte bObj = new Byte("10");
   /*w ww  .j a  v  a 2  s.co m*/
    //use toString method of Byte class to convert Byte into String.
    String str = bObj.toString();
    System.out.println("Byte converted to String as " + str);
  }
}

Result


Related Tutorials