Homework Clinic

Science Clinic => Computer Science => Topic started by: oliviahorn72 on May 6, 2020

Title: The order of the precedence (from high to low) of the operators binary +, *, &&, ||, & is ________.
Post by: oliviahorn72 on May 6, 2020

Question 1

What is the output of the following code?

boolean even = false;
System.out.println((even ? "true" : "false"));

◦ true
◦ false
◦ nothing
◦ true false

Question 2

The order of the precedence (from high to low) of the operators binary +, *, &&, ||, & is ________.
◦ &, ||, &&, *, +
◦ *, +, &, ||, &&
◦ &&, ||, &, *, +
◦ *, +, &&, ||, &
◦ *, +, &, &&, ||
Title: The order of the precedence (from high to low) of the operators binary +, *, &&, ||, & is ________.
Post by: TheNamesImani on May 6, 2020

Answer 1

false

Answer 2

*, +, &, &&, ||
Title: Re: The order of the precedence (from high to low) of the operators binary +, *, &&, ||, & is ______
Post by: Ali Roumani on Sep 27, 2022
tysmmmmmm