Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners How to convert into to String in Java?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
How to convert into to String in Java?
1 Answer(s)      a year and 9 months ago
Posted in : Java Beginners


Hi, How to convert into to String in Java?

Thanks


Advertisement
View Answers

December 21, 2012 at 4:40 PM


Hi,

For this following code can be used:

Integer.toString(i);

Here is the complete example:

class IntegerToString 
{
    public static void main(String[] args) 
    {
        System.out.println("Converting Integer to String");
        Integer i= new Integer(10);
        String s = Integer.toString(i);
        System.out.println(s);


    }
}

See the tutorial Convert an Integer into a String.

Thanks



Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com