Question 1
What is the result of compiling the following program? ```java public class Main { public static void main(String[] args) { System.out.println(true > false); } } ```
A. true
This assumes booleans are ordered with true above false; Java gives booleans no ordering at all.
B. Compilation failsCorrect answer
Relational operators apply only to numeric types, so comparing booleans with > is a "bad operand types" error (JLS 8 §15.20.1).
C. false
No comparison result is produced at all — the expression is rejected while compiling.
D. 1
Booleans have no numeric value in Java, and a relational operator would yield a boolean rather than an int anyway.
Explanation
Relational operators (<, >, <=, >=) apply only to NUMERIC types — booleans have no ordering in Java ("bad operand types"). Only ==, !=, and the logical operators accept booleans.