• Post Reply Bookmark Topic Watch Topic
  • New Topic

Errata: OCP Oracle Certified Professional Java SE 8 Programmer II - Chapter 3  RSS feed

 
Titi Wangsa Damhore
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 8


The answer is correct.
Just that the explanation is incorrect.
Therefore, the smallest element that is larger than the specified value is "One".

It should be something like this:
Therefore, the smallest element that is larger than or equal to the specified value is "One".



as per the documentation here: TreeSet (Java Platform SE 8 )
Returns the least element in this set greater than or equal to the given element, or null if there is no such element.


If the question were like this:

The result would be "On".
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37507
552
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Titi,
Agreed. Thanks for noticing and pointing that out.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!