Copyright © tutorialspoint.com

# Java Collection - Programming Examples

Learn how to play with collections in Java programming. Here are most commonly used examples:

1. How to convert an array into a collection?

2. How to compare elements in a collection?

3. How to convert a collection into an array?

4. How to print a collection?

5. How to make a collection read-only?

6. How to remove a specific element from a collection?

7. How to reverse a collection?

8. How to shuffle the elements of a collection?

9. How to get the size of a collection?

10. How to iterate through elements of HashMap?

11. How to use different types of Collections?

12. How to use enumeration to display contents of HashTable?

13. How to get Set view of Keys from Java Hashtable?

14. How to find min & max of a List?

15. How to find a sublist in a List?

16. How to replace an element in a list?

17. How to rotate elements of the List?

Copyright © tutorialspoint.com