Posted By

karellism on 04/22/13


Tagged

String integer


Versions (?)

Converting String to Integer & Integer to String


 / Published in: Java
 

Converting String to Integer & Integer to String

  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
Posted By: ha1ha1 on November 1, 2017

hm..interested in how it works -- does it mean 2 becomes two and vice versa?? anyways, will try it out once finish up my acewriters assignment

You need to login to post a comment.