String[] elements = { "for", "tea", "too" }; String first = (elements.length > 0) ? elements[0] : null;
What is the result?
Compilation fails
An exception is thrown at runtime
The variable first is set to null
The variable first is set to elements[0]