The Artima Developer Community
Sponsored Link

Java Answers Forum
string to int

1 reply on 1 page. Most recent reply: May 8, 2006 12:06 AM by Matthias Neumair

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 1 reply on 1 page
Alex Tanil

Posts: 10
Nickname: alextanil
Registered: May, 2006

string to int Posted: May 6, 2006 12:03 PM
Reply to this message Reply
Advertisement
lets say i have a string like this ert+234dgg. There must be a method in a java class so i can read it an convert 234 to an int.
Do you happen to know who i can do that?


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: string to int Posted: May 8, 2006 12:06 AM
Reply to this message Reply
1. Create a filter wich allows only numbers to pass
2. Use Integer.parseInt

Flat View: This topic has 1 reply on 1 page
Topic: floats Previous Topic   Next Topic Topic: Encoding

Sponsored Links



Google
  Web Artima.com   

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