kustom:
Is this going to work?boolean varA = true;
int varB = 2;
int varC;
varC = varB - (int)varA;
Expected result would be c = 1.
Whether or not it works, I wouldn't be doing it. Apart from the arguments about whether or not true is equivalent to 1, it is like subtracting apples from oranges. Your expression would be more correctly (readably) written as:
varC = varB;
if (varA)
varC--;
Or even:
varC = varB - (varA ? 1 : 0);