• Post Reply Bookmark Topic Watch Topic
  • New Topic

Assign int to String  RSS feed

 
Vasantha Prabha
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the different ways that I can Assign int value to a String
Regards
Vasantha
 
Dani Atrei
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use this:
valueOf:
public static String valueOf(int i)Returns the string representation of the int argument.
The representation is exactly the one returned by the Integer.toString method of one argument.

Parameters:
i - an int.
Returns:
a string representation of the int argument.
See Also:
Integer.toString(int, int)
Note the method is static.
 
Jeffrey Spaulding
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And of course


Cheers,

J.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!