Convert Long object to String - Java Language Basics

Java examples for Language Basics:long

Description

Convert Long object to String

Demo Code

 
public class Main {
 
  public static void main(String[] args) {
    Long lObj = new Long(10);
   //from w w  w .ja va 2 s. c  o  m
    //use toString method of Long class to convert Long into String.
    String str = lObj.toString();
    System.out.println("Long converted to String as " + str);
  }
}
 

Result


Related Tutorials