A

Admin • 828.03K Points
Coach

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
  • Correct Answer - Option(A)
  • Views: 7
  • Filed under category Java
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.