Home » JAVA Programming » Basic Operators » Question
  1. What is the output of this program?

    public class Relational_operator_Example
    {
    public static void main(String args[])
    {
    int num1 = 7;
    int num2 = 6;
    System.out.print(num1 > num2);
    }
    }
    1. true
    2. false
    3. 1
    4. 0
    5. None of these
Correct Option: A

Operator > returns a boolean value. 5 is not greater than 6 therefore false is returned.
output: true



Your comments will be displayed only after manual approval.