MCQOPTIONS
Saved Bookmarks
| 1. |
What would be the output of the following snippet, if compiled and executed with command line “hello there”? public class abc { String[] xyz; public static void main(String argv[]) { xyz=argv; } public void runMethod() { System.out.println(argv[1]); } } |
| A. | Compile time error |
| B. | Output would be “hello” |
| C. | Output would be “there” |
| D. | Output would be “hello there” |
| Answer» B. Output would be “hello” | |