output

Can someone explain why the answer to the following M/C question is, "The code will not compile"?

if (x > 5 )
if ( y < 10 )
System.out.print(

Comments

  • Hi,

    Each paragraph of code is a block of code, but you should tell the java compiler which blocks of code should be maintained united, and that should by accomplished with {}

    What you are telling the compiler is this, (if you had properly indented):

    [code]if (x > 5 ) {
    if (y < 10) {
    System.out.print(
  • Thank you very much. The more I looked at it I thought it was a synrax error.
  • Thank you very much. The more I looked at it I thought it was a synrax error.
  • Thank you very much. The more I looked at it I thought it was a synrax error.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories