About Question enthuware.ocpjp.v7.2.1546 :
Moderator: admin
-
- Posts: 8
- Joined: Sun Feb 03, 2013 9:47 am
- Contact:
About Question enthuware.ocpjp.v7.2.1546 :
No explaination for the answer.
-
- Site Admin
- Posts: 10067
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1546 :
All name-value maps such as HashMap and TreeMap implement java.util.Map and all collections such as ArrayList, and LinkedList implement java.util.Collection.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 3
- Joined: Wed Oct 04, 2023 2:56 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1546 :
In the question, it's asked what is the root interface for all collection-related interfaces?
As we know HashMap, LinkedHashMap, and TreeMap are not interfaces can we consider the correct answer only as Collection?
As we know HashMap, LinkedHashMap, and TreeMap are not interfaces can we consider the correct answer only as Collection?
-
- Site Admin
- Posts: 10067
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1546 :
Maps and lists/sets are part of a broader "collections api" but they don't have a common interface. The root interface for maps is Map and for list/set is Collection.
What option(s) you should select depends on the problem statement and the number of options you have to select. In this question, it asks you to select two interfaces and it also says "all collection related interfaces". Although HashMap is not an interface, but Map is.
Generally, there is no need to read between the lines for such questions. Just go with the most obvious interpretation.
What option(s) you should select depends on the problem statement and the number of options you have to select. In this question, it asks you to select two interfaces and it also says "all collection related interfaces". Although HashMap is not an interface, but Map is.
Generally, there is no need to read between the lines for such questions. Just go with the most obvious interpretation.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 227 guests