MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the program? class Equals { public static void main(String [] args) { int x = 100; double y = 100.1; boolean b = (x = y); /* Line 7 */ System.out.println(b); } } |
| A. | 1 |
| B. | |
| C. | Compilation fails |
| D. | An exception is thrown at runtime |
| Answer» D. An exception is thrown at runtime | |