Question: Which one is NOT correct about Map collection? Question 2 options: A Map is an object that maps keys to values TreeMap is faster than
Which one is NOT correct about Map collection?
Question options:
A Map is an object that maps keys to values
TreeMap is faster than HashMap
In Java, the Map interface and has various implementations.
TreeMap guarantees the order of iteration
Question point
Saved
Which one is NOT correct about the piece of the java code:
List strList new ArrayList;
strList.addA;
strList.addC;
strList.addZ;
strList.addE;
Collections.sortstrList;
forString str: strList
System.out.printstr;
Question options:
The first elemet the for loop prints is A
ArrayList is a collection
"Collections.sortstrList; needs to be changed to "Collection.sortstrList;
"strList.addE; the element E is added at the end of the list.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
