0 votes
1.8k views
in JDBC by
How to convert int to string in java? If you have integer value 125 then how to convert string?

1 Answer

0 votes
by

You see the following code to convert int to string in java:

package com.developerhelpway.conversion;


public class IntegerToStringConversion {

    /**
     * @param args
     */
    public static void main(String[] args) {
        int intnum = 125;
        String strnum = String.valueOf(intnum);
        System.out.println("Integer Num: " + intnum);
        System.out.println("String Num: " + strnum);
    }

}

Output:

Integer Num: 125
String Num: 125
 

Share:- Whatsapp Facebook Facebook


Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.

Categories

...