How to convert into to String in Java?

Ads
 

How to convert into to String in Java?

Hi, How to convert into to String in Java?

Thanks

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

Ads









Related Tutorials/Questions & Answers:
How to convert into to String in Java?
How to convert a String to an int?
Advertisements
How to Convert String to Date?
How to convert String into java.util.Date
How to convert string to byte in Java
how to convert string to image in java
how to convert string to double in java
How ro convert char into string??
difference between java5 and java6 - Java Beginners
Java2
How to convert Arraylist into String Array Java
How to convert String double quotos to String double double quotes(
How to convert Input Stream to String in java
how to convert xml string to soap request object using axis1.4?
Please tell me how can i convert string to timer
Convert charArray to String
How ro convert char into string using recursive function in c#??
about java1
Convert Number to String
Java convert string to InputStream
convert string to date nsdate
Convert String to Number
How to convert string to date in java in yyyy-mm-dd format?
Convert Array to String
Convert String to a float
Convert String to long
Convert Character into a String
Convert string into character array
Javah
Convert a String to Hexa
Read/Convert an inputStream to a String

Ads