public static void main(String[] args) { String t = "5"; Integer integer = Integer.valueOf(t); System.out.println(integer); // --------> 5 }