Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.83 :

Posted: Sun Jun 25, 2017 4:37 pm
by TwistedLizard
From the explanation:
Only Map has values() method. This method returns a Set of values stored in the Map.
Is this an error?

A Set contains no duplicate elements. Although the keys of a Map cannot contain duplicates, the values can. Hence, Map.values() can't return a Set, it returns a Collection.

Re: About Question com.enthuware.ets.scjp.v6.2.83 :

Posted: Mon Jun 26, 2017 12:21 am
by admin
You are right. Fixed.
thank you for your feedback!
Paul.