Im stuck at this exercise


#1

https://www.codecademy.com/courses/learn-java/lessons/conditionals-control-flow/exercises/if-statement?action=lesson_resume

I am seriously stuck right here.

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

	if () {

		System.out.println("Access granted.");

	}
	
}

}

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


#2

if (){

you need a condition inside ( )

the condition should be a Boolean expression that evaluates to true not false.

have a look at the example in that lesson


#4

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