I found the following question in Oracle's site sample questions section. Posting the url in a code tag as it has the word " p l s" in it.
The answer that they gave sounds wrong. Am I wrong in thinking A to be the answer for the following question?
OBJECTIVE: 7.2: Given an example of a class and a command-line, determine the expected runtime behavior.
10) Given:
Which command-line invocation will produce the output found?
a) java -Dx=y x y z
b) java -Px=y x y z
c) java -Dx=y x x y z (*)
d) java -Px=y x x y z
e) java x x y z -Dx=y
f) java x x y z -Px=y
REFERENCE:
API for java command
Option C is correct. -D sets a property and args[1] is the second argument (whose value is y)
Its correct - 'C' is the answer
I too thought for a moment that 'A' might be the answer, but then realized that 'x' is the name of the class.
In A : java -Dx=y x y z , the command line arguments are y and z(not x) - that makes this option wrong