This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Just a small correction... not related to the question...
does this statement print anything meaningful ?
shouldn't it be like ->
Time is what we want the most, but what we use the worst. -- William Penn
Joined: Oct 24, 2010
You are right, that it doesn't print anything meaningful, but that was part of the difficulty with choosing the proper answers as well. The available answers were as follows:
Which are true? (Choose all that apply)
A. The output could contain 30
B. The output could contain @bf73fa
C. The output could contain DIAMONDS
D. Compilation fails due to an error on line 6
E. Compilation fails due to an error on line 7
F. Compilation fails due to an error on line 8
and so on
The correct answers were A and B because of how some of the output was unpredictable like you mentioned. You are also correct in stating that using Arrays.asList() will print valuable output as opposed to Suits.values()