Converting Strings to int and int to String

Submitted by:Tim Kelly

Date added:19 March, 2011

Category:Java

Very useful Java code snippets for Java developers -
Converting Strings to int and int to String

Tags: converting strings

Code Snippet:

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

Comments