QSet Logo
Public
QS

@qs_by_qset

Created this 5 months ago

Java Collections Questions and Answers

Less than 10 submissions

This document contains a list of questions and answers on Java collections.

Stop reading

Practice these questions and get feedbacks! It will help you improve your answer.

Ads section

1. What is the difference between an ArrayList and an array?

2. How do you get the first element of a LinkedList?

Please login to your account to view this. Login

3. How do you iterate over a Map in Java?

4. How do you create a HashSet in Java?

5. What is the difference between a HashMap and a TreeMap?

6. What is the difference between a Collection and a Map?

7. How do you iterate over an array in Java?

8. How do you create a HashMap in Java?

9. How do you create an ArrayList in Java?

10. How do you create a BlockingQueue in Java?

11. How do you create a PriorityQueue in Java?

12. What is the difference between a List and a Set in Java?

13. What is the difference between a Deque and a Queue?

14. How do you create a LinkedHashSet in Java?

15. What is the difference between a Stack and a Queue?

16. What is the difference between a CopyOnWriteArrayList and an ArrayList?

17. What is the difference between a WeakHashMap and a HashMap?

18. How do you create a ConcurrentHashMap in Java?

19. How do you sort a List in Java?