converting integers to string in java

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2006
Posts: 2
Reputation: yneng21 is an unknown quantity at this point 
Solved Threads: 0
yneng21 yneng21 is offline Offline
Newbie Poster

converting integers to string in java

 
0
  #1
Nov 9th, 2006
how will I convert integers onto strings? trillion integers into strings.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,448
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 261
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: converting integers to string in java

 
0
  #2
Nov 9th, 2006
  1. int i = 0;
  2. String str = "" + i;
  3.  
  4. // or
  5.  
  6. int i = 0;
  7. String str = String.valueOf(i);
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC