Returned output as false but still not marked right


#1



https://www.codecademy.com/courses/learn-java/lessons/conditionals-control-flow/exercises/boolean-operators-precedence?action=lesson_resume&link_content_target=interstitial_lesson

The output, as was asked, is returning false,but it isn't ticked off right. Please help
Error says " Almost! Did you use each boolean operator no more than one time?"


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

		boolean riddle = !( (1 < 8)||(5 < 2 && 3 < 5));
		System.out.println(riddle);

	}
}


#2

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

		boolean riddle = /**/( 1 < 8 /**/ (5 > 2 /**/ 3 < 5));
		System.out.println(riddle);

	}
}

just use each Boolean operator in place of /**/ nothing else and make it false


#3

Yeah it worked .. Thanks :slight_smile:


#4

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