java.lang.string to integer code example Example 1: string to int java int result = Integer.parseInt(number); Example 2: java string from int String.valueOf(i)