soompi forums: Java problem... - soompi forums

Jump to content

Page 1 of 1

Java problem... simple question

#1 User is offline   santoki 

  • Member
  • Pip
  • Group: Members
  • Posts: 68
  • Joined: 04-October 05

Posted 15 October 2005 - 06:49 PM

How do you switch a String value to an int or a double???
0

#2 User is offline   OsiX 

  • Member
  • Pip
  • Group: Members
  • Posts: 962
  • Joined: 05-October 05

Posted 15 October 2005 - 07:23 PM

You can't cast Strings into Int or Double.
0

#3 User is offline   santoki 

  • Member
  • Pip
  • Group: Members
  • Posts: 68
  • Joined: 04-October 05

Posted 16 October 2005 - 01:02 PM

is there a way to do the opposite? int or double into a String?
0

#4 User is offline   nevets1219 

  • Member
  • Pip
  • Group: Members
  • Posts: 628
  • Joined: 04-October 05

Posted 17 October 2005 - 10:15 AM

I thought you could, that is one of the best beginning features of Java after all...you can easily parse number and strings to and from smile.gif

Look here for more detailed info (follow their advice and download and read their API)
http://forum.java.sun.com/thread.jspa?thre...ssageID=3660715
0

#5 User is offline   djjoshep 

  • Member
  • Pip
  • Group: Members
  • Posts: 82
  • Joined: 04-October 05

Posted 20 October 2005 - 01:48 AM

lol, if youre taking a java class, im surprised this isnt one of the first things you learn....
0

Share this topic:


Page 1 of 1

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users