This thread has been solved but I would also like to add a small suggestion. If for some reason you want to use ints for boolean expressions, why don't you make a class for it. Call it: BoolInt. Have it have one int private attribute and with the help of public set methods make sure that the only valid values are 1 and 0 (or whatever you want)
class BoolInt {
public static final int INT_TRUE = 1;
public static final int INT_FALSE = 0;
public BoolInt() {
}
private int i = INT_FALSE;
public int getIntValue() {
return i;
}
public boolean getBoolValue() {
return i==INT_TRUE;
}
public void setIntValue(int i) throws Exception {
// if the user doesn't enter 1 or 0 throw exception
if (i!=INT_TRUE || i!=INT_FALSE) throw new Exception("your message");
this.i=i;
}
public void setBoolValue(boolean b) {
i = (b)?INT_TRUE:INT_FALSE
}
}