I\'m learning Java, coming from C and I found an interesting difference between languages with the boolean type. In C there is no bool/ean
boolean
bool
ean
Try BooleanUtils from Apache common-lang.
BooleanUtils.toBoolean(0) = Boolean.FALSE BooleanUtils.toBoolean(1) = Boolean.TRUE BooleanUtils.toBoolean(2) = Boolean.TRUE