public static void main(String[] args) { String yourString = "420"; int yourInt = Integer.parseInt(yourString); System.out.println(yourInt); }