I'm not really familiar with Java syntax, but from what randomizer said bool plus = 0 equivalent in Java should be:
boolean plus = false;
And as for i, it's declared in the loop at line 3:
int i = 0;
Finally, operator ! flips the boolean value, if it was true, it becomes false, and if it was false, it becomes true.