Long是包装类型,直接用==比较是比较的对象地址 正确的比较方式是 方式1 Long a = 1000L; Long b = 2000L; a.equals(b); 方式2 a.longValue() == b.longValue();