Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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".
 
author & internet detective
Marshal
Posts: 38250
623
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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!