/** * Demo how to convert int to String and back. Similar * stuff can be done with the Float, Double, etc. classes * in java.lang ***/ public class StringToInt { public static void main(String args[]) throws Exception { // From String to int String sA="123"; int iA=Integer.parseInt(sA);
// From int to String int iB=23; String sB = String.valueOf(iB); } }