Q63
What will be the output of the following Java 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
AnswerB.
Output would be "hello"
C.
Output would be "there"
D.
Output would be "hello there"
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board