Which collection does not extend the Collection interface?

Practice More Questions From: Quiz 7 : Collections/Maps

Q:

What type of collection would we use if we wanted to eliminate duplicates?

Q:

Are elements in a HashSet ordered?

Q:

Which collection does not extend the Collection interface?

Q:

Which type of Set would you use respectively? 1. If you desire fast access and don’t care about ordering 2. If you need elements sorted

Q:

What kinds of data type(s) can we store in a Collection?

Q:

What kinds of data type(s) can we store in an array?

Q:

What will be the output of the following program? class Main { public static void main(String[] args) { HashSet set = new HashSet(); set.add(“Hello”); set.add(“Hello”); set.add(“Goodbye”); for (String s: set) { System.out.print(s); } } }

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments