Integer.parseInt( String.valueOf(numb1)); code example Example: convert a string to int in java String myString = "1234"; int foo = Integer.parseInt(myString);