How to convert into to String in Java?

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









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 into java.util.Date
How to Convert String to Date?
difference between java5 and java6 - Java Beginners
How to convert string to byte in Java
how to convert string to double in java
how to convert string to double in java
how to convert string to double in java
how to convert string to double in java
how to convert string to image in java
How to convert String to int in Java
How to convert String to int in Java
How to convert String to int in Java
How to convert String to int in Java
How ro convert char into string??
How to convert date to string in Java?
Java2
how to convert string to char array in Java
How to convert Arraylist into String Array Java
How to convert String double quotos to String double double quotes(
about java1
How to convert Input Stream to String in java
How to convert a stack trace to a string?
How to convert a stack trace to a string?
Convert charArray to String
Convert Number to String
Convert Array to String
Convert String to Number
Java convert string to InputStream
how to convert xml string to soap request object using axis1.4?
Please tell me how can i convert string to timer
Convert String to a float
How ro convert char into string using recursive function in c#??
how to convert string to char array in java without using tochararray
How to convert string to date in java in yyyy-mm-dd format?
convert string to date nsdate
How to convert date to string in Java in yyyy-mm-dd format
Convert String to long
Javah
Read/Convert an inputStream to a String
Convert a String to Hexa
Convert Character into a String
Convert string into character array
javaa swings - IDE Questions
How to convert String Date to Timestamp in Java?
Convert String to Date
Javap Tool application
Convert String to Calendar
convert string type to mathod name

Ads