0 votes
in JAVA by
How to convert int to string in java?

1 Answer

0 votes
by
How to convert int to string in java?

class Convert

{

  public static void main(String args[])

  {

    int a = 786;

    int b = -986;

    String str1 = Integer.toString(a);

    String str2 = Integer.toString(b);

    System.out.println(""String str1 = "" + str1);  

    System.out.println(""String str2 = "" + str2);

  }

Related questions

0 votes
asked Oct 20, 2020 in JAVA by sharadyadav1986
0 votes
asked Sep 3, 2019 in JAVA by Robin
...