Given:<br /> String[] elements = { "for", "tea", "too" };<br /> String first = (elements.length > 0) ? elements[0] : null;<br /> What is the result?()<p> Given:<br /> String[] elements = { "for", "tea", "too" };<br /> String first = (elements.length > 0) ? elements[0] : null;<br /> What is the result?()</p>
A、A.Compilation fails.
B、B.An exception is thrown at runtime.
C、C.The variable first is set to null.
D、D.The variable first is set to elements[0].