Exercise 6

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

	if  (9>2) {

		System.out.println("true");

	}
	
}

}

that the answer “Did you use a Boolean expression that evaluates to true?”
can’t understand what to do

<do not remove the three backticks above>

write true without quotes

true(without quotes) is Boolean value but “true”(with quotes) is string

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

if (9>2) {

System.out.println(true);

still the same answer

“Did you use a Boolean expression that evaluates to true?”

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