Что будет выведено, если скомпилировать и запустить следующий код:

public class Main {
    public static void main(String s[]) {
        System.out.println(true ? false : true == true ? false : true);
    }
}
Explanation
Current ternary operator expression works like this:

if (true) { return false; }
else { 
    if (true == true) { return false; }
    else { return true; }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes