java int 转 object,如何将Object转换为int
How can I cast an Object to an int in java?解决方案If you're sure that this object is an Integer :int i = (Integer) object;Or, starting from Java 7, you can equivalently write:int i = (int) object;Beware,...