Talk:Java Programming/Boolean expressions

GetBinary.java example prints the binary value in reverse: 11 prints == 1101 instead of 1011 Raystm2 (discuss • contribs) 03:20, 9 March 2012 (UTC)

Apparently this condition can be fixed if we add one line penultimately and make a minor change to the last line, or so I think. I am just a beginner here, but this worked for me. ;-)

Raystm2 (discuss • contribs) 04:27, 9 March 2012 (UTC)

In reference to the TODO at the bottom of the page...

Both examples do compile as written. If the above changes are made to GetBinary.java, it gives the correct answer.Raystm2 (discuss • contribs) 05:00, 9 March 2012 (UTC)
 * I think it's better to write the code as I have changed it. Ftiercel (discuss • contribs) 16:54, 9 March 2012 (UTC)
 * Yes! Much more elegant of a solve. Also, Thank you for that little lesson.Raystm2 (discuss • contribs) 05:04, 11 March 2012 (UTC)