Converting String to Integer & Integer to String


/ Published in: Java
Save to your folder(s)

Converting String to Integer & Integer to String


Copy this code and paste it in your HTML
  1. String a = String.valueOf(2); //integer to numeric string
  2. int i = Integer.parseInt(a); //numeric string to an int

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.