Stuck at if statement


#1

I'm basically stuck at 2.6 Learn Java. If statement

Instruction :
1.
The if statement in the code editor is missing its Boolean expression. Provide the if statement with a Boolean expression that evaluates to true.

My code:

public class If public class If {
public static void main(String[] args) {

if (9 > 2) {
System.out.println("Control flow rocks!");}

}
}

I don't know what is wrong.


#2

If you look at the first line of your code, there are two declarations of the class "if". Delete one of them so that the top line looks as such:

public class If {

Then it should work fine.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.