This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
The boolean b is automatically intialized to false. The char ch is automatically initialized to \u0000 which is 0 (Remember you can use Unicode anywhere in your code) so the if statement reads like this if (false) // skips the if section and goes to the else block. The assignment else x = ( ba[ch] = b ); will break down like this else x = ( ba[ch] = b ); //original else x = (ba = false); // first op else x = (false); 2nd op So the sys print will print System.out.println(false" "+false);
member variables will be given default value if they're not initiated. so b=false ia=0 ch='\u0000' ba=false so in if block, as b is false, it'll go to else statement. b(false) is first assigned to ba, then x. so both x and ba[ch] are false