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


You need to login to view comments.