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

Ads