nerdexam
Oracle

1Z0-809 · Question #171

Given the code snippet from a compiled Java source file: public class MyFile { public static void main(String[] args) { String arg1 = args[1]; String arg2 = args[2]; String arg3 = args[3]…

The correct answer is B. java MyFile 1 3 2 2. You've hit your session limit · resets 10:20pm (America/New_York)

Question

Given the code snippet from a compiled Java source file: public class MyFile { public static void main(String[] args) { String arg1 = args[1]; String arg2 = args[2]; String arg3 = args[3]; System.out.println("Arg is " + arg3); } } Which command-line arguments should you pass to the program to obtain the following output? Arg is 2

Options

  • Ajava MyFile 0 1 2 3
  • Bjava MyFile 1 3 2 2
  • Cjava MyFile 1 2 2 3 4
  • Djava MyFile 2 1 2

How the community answered

(24 responses)
  • A
    8% (2)
  • B
    83% (20)
  • C
    4% (1)
  • D
    4% (1)

Explanation

You've hit your session limit · resets 10:20pm (America/New_York)

Community Discussion

No community discussion yet for this question.

Full 1Z0-809 Practice