how to convert any object to int in java code example Example: parse object to int java int i = (Integer) object;