Labels

Thursday, June 7, 2012

How to Convert Strings to int and int to String in Java?

String a = String.valueOf(2);   //integer to numeric string
int i = Integer.parseInt(a); //numeric string to an int

No comments:

Post a Comment