string to int if possible code example Example: java string to integer String example = "1"; int converted = Integer.parseInt(example);