Post

So Java doesn't do implicit integer-to-boolean (0 - false and 1 - true). Thus you get a compile error here. @i_sopov got there first!
English

@EclipseJavaIDE (not cheating) does Java do a sort of zero -> false, nonzero -> true kinda thing?
In which case it'd print "-1" since the loop condition isn't true on the first iteration, and s is never increased
English

@EclipseJavaIDE Get compile time error because in the if condition it will check for boolean value. But we are giving integer
English

@EclipseJavaIDE Compilation Error as condtitional expression is missing in for loop
English

@EclipseJavaIDE I think it should be -1.
As i will be 0 (i.e. false), the condition fails at first iteration itself and value of s will be as is.
English

@EclipseJavaIDE Exception because the condition in the for loop is not set.
English

@EclipseJavaIDE Throws an error for the condition is not specified.
English

@EclipseJavaIDE Compilation error -
The type of the termination expression is an integer value.
Expression should be constructed in such a way that it returns a Boolean value True/False.
Upon executing this code an Exception will be generated which will indicate a compilation error.
English









