nerdexam
Oracle

1Z0-803 · Question #38

Which two will compile, and can be run successfully using the command: Java fred1 hello walls

The correct answer is C. Prints out: [Ljava.lang.String;@39341183 D. Prints out: walls. Throws java.lang.ArrayIndexOutOfBoundsException: 2 at certquestions.Fred1.main(Fred1.java:3)

Creating and Using Arrays

Question

Which two will compile, and can be run successfully using the command:

Java fred1 hello walls

Exhibit

1Z0-803 question #38 exhibit

Options

  • AOption A
  • BOption B
  • CPrints out: [Ljava.lang.String;@39341183
  • DPrints out: walls

How the community answered

(43 responses)
  • A
    14% (6)
  • B
    5% (2)
  • C
    81% (35)

Explanation

Throws java.lang.ArrayIndexOutOfBoundsException: 2 at certquestions.Fred1.main(Fred1.java:3)

Topics

#main method#command-line arguments#arrays#String[] args

Community Discussion

No community discussion yet for this question.

Full 1Z0-803 Practice