Q. What is the output of this program?

Code:
public class Relational_operator_Example
    {
        public static void main(String args[])
        {
            int num1 = 7; 
            int num2 = 6;
            System.out.print(num1 > num2);
        } 
    }
  • (A) true
  • (B) false
  • (C) 1
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (A) true
Explanation: Operator > returns a boolean value. 5 is not greater than 6 therefore false is returned.
output: true
Explanation by: Rajeev Malhotra
Operator > returns a boolean value. 5 is not greater than 6 therefore false is returned.
output: true

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
282
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Rajeev Malhotra
Publisher
πŸ“ˆ
97%
Success Rate