Please tell everyone why it is showing error? | Sololearn: Learn to code for FREE!

+1

Please tell everyone why it is showing error?

public class Program { public static void main(String[] args) { int a = 8; boolean correct = true; boolean wrong = false; if (a<=16); { System.out.println(correct); } else { System.out.println(wrong); } } }

10/22/2021 4:42:35 PM

Mayukh Banerjee

3 Answers

New Answer

+3

Remove the semicolon after the `if` conditional if( a <= 16 ) // remove semicolon ;

+1

Plz anyone

+1

Thanks ๐Ÿ™