-1

How do I convert string to integer?

I have tries many ways and it seems to be showing some error. example "100" which is in integer format"

 email.get(0);
6
  • 2
    Integer.valueOf(YourString) Commented Dec 11, 2013 at 7:42
  • 1
    possible duplicate of Converting a string to an integer on Android Commented Dec 11, 2013 at 7:43
  • What about Integer.parse("string"); Commented Dec 11, 2013 at 7:44
  • 1
    Integer.parseInt("string") Commented Dec 11, 2013 at 7:47
  • 1
    You should search before posting questions.. this is duplicate Commented Dec 11, 2013 at 7:55

1 Answer 1

2

You can parse like following code:

int a = Integer.parseInt(email.get(0));
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.