MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?class equal { int p; int q; boolean isequal() { return(p == q); } } public class Result { public static void main(String args[]) { equal obj = new equal(); obj.p = 7; obj.q = 10; System.out.println(obj.isequal()); } } |
| A. | Compiletime error |
| B. | false |
| C. | Runtime error |
| D. | true |
| E. | None of these |
| Answer» C. Runtime error | |