output - Programmers Heaven

Howdy, Stranger!

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

Categories

output

vstarvstar Posts: 8Member
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

  • HackmanCHackmanC Posts: 441Member
    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(
  • vstarvstar Posts: 8Member
    Thank you very much. The more I looked at it I thought it was a synrax error.
  • vstarvstar Posts: 8Member
    Thank you very much. The more I looked at it I thought it was a synrax error.
  • vstarvstar Posts: 8Member
    Thank you very much. The more I looked at it I thought it was a synrax error.
Sign In or Register to comment.