The Artima Developer Community
Sponsored Link

Java Answers Forum
integers to strings

4 replies on 1 page. Most recent reply: Mar 26, 2002 11:33 PM by Singh M.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Mary

Posts: 7
Nickname: dj
Registered: Mar, 2002

integers to strings Posted: Mar 26, 2002 1:57 PM
Reply to this message Reply
Advertisement
can you change integers to strings. I know you can change strings to integers and you can change a double to string. Please help.....


Mohit Gupta

Posts: 15
Nickname: mohit
Registered: Mar, 2002

Re: integers to strings Posted: Mar 26, 2002 4:05 PM
Reply to this message Reply
yes if that string can change to int, use ::
Integer.parseInt(string);

Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: integers to strings Posted: Mar 26, 2002 5:35 PM
Reply to this message Reply
Use String.valueOf(int)

abhijeet

Posts: 13
Nickname: aaraje
Registered: Mar, 2002

integers to strings Posted: Mar 26, 2002 9:33 PM
Reply to this message Reply
use this for integer
String first="";
int i=99;
first=""+i;
for doubles you require NumberFormatClass

Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: integers to strings Posted: Mar 26, 2002 11:33 PM
Reply to this message Reply
never follow this kind of style. Apart from being confusing, it is inefficient as well.

Flat View: This topic has 4 replies on 1 page
Topic: SSL in java Previous Topic   Next Topic Topic: Can anyone tell me where I went wrong??

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use