nerdexam
Oracle

1Z0-851 · Question #139

Given the following directory structure: bigProject |--source | |--Utils.java | |--classes |-- And the following command line invocation: javac -d classes source/Utils.java Assume the current…

The correct answer is C. If the compile is successful, Utils.class is added to the classes directory. See the full explanation below for the reasoning.

Question

Given the following directory structure: bigProject |--source | |--Utils.java | |--classes |-- And the following command line invocation: javac -d classes source/Utils.java Assume the current directory is bigProject, what is the result?

Options

  • AIf the compile is successful, Utils.class is added to the source directory.
  • BThe compiler returns an invalid flag error.
  • CIf the compile is successful, Utils.class is added to the classes directory.
  • DIf the compile is successful, Utils.class is added to the bigProject directory.

How the community answered

(32 responses)
  • A
    3% (1)
  • B
    9% (3)
  • C
    75% (24)
  • D
    13% (4)

Community Discussion

No community discussion yet for this question.

Full 1Z0-851 Practice