Demonstrate that accidentally placing a semicolon after the right parenthesis of the condition in an if statement

Question:

Demonstrate that accidentally placing a semicolon after the right parenthesis of the condition in an if statement can be a logic error.

if (3 == 5); {

System.out.println("3 is equal to 5");

}

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: