well i might be late on this but i would like to share something:
Given the input: System.out.println(isGreaterThanZero(-1));
public static boolean isGreaterThanZero(Integer value) {
return value == null?false:value.compareTo(0) > 0;
}
Returns false
public static boolean isGreaterThanZero(Integer value) {
return value == null?false:value.intValue() > 0;
}
Returns true So i think in yourcase 'compareTo' will be more accurate.