java can be casted to int code example Example: java strin to int String myString = "1234"; int foo = Integer.parseInt(myString);