convert boolean to int java code example
Example 1: java cast bolean to int
int result = myBooleanVar ? 1 : 0;
Example 2: convert boolean to int
int val = (bool) ? 1 : 0;
Example 3: java cast int to boolean
boolean result = (myBinaryInt == 1);
boolean result2 = (myNonBinaryInt >= 1);