Question: Question 2 What output is produced by the following code fragment? int num = 50, MAX = 50; if (num >= MAX) System.out.println(apple); System.out.println(orange); System.out.println(pear);
Question 2
What output is produced by the following code fragment?
int num = 50, MAX = 50;
if (num >= MAX)
System.out.println("apple");
System.out.println("orange");
System.out.println("pear");
|
| A. | orange pear |
|
| B. | Nothing will be printed out. |
|
| C. | pear |
|
| D. | apple orange pear |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
