Following example is converting a String to int.
Live Demo
public class Tester { public static void main(String[] args) { String intString = "1234"; int value = new Integer(intString).intValue(); System.out.println(value); } }
1234