MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program? class ternary_operator { public static void main(String args[]) { int x = 3; int y = ~ x; int z; z = x > y ? x : y; System.out.print(z); } } |
| A. | 0 |
| B. | 1 |
| C. | 3 |
| D. | -4 |
| Answer» D. -4 | |