Day 13 focuses on the Java Collections Framework.
The practice programs cover commonly used collection classes and concepts such as ArrayList, LinkedList, HashSet, TreeSet, HashMap, TreeMap, Iterator, sorting, and removing duplicate values.
ArrayListLinkedListHashSetTreeSetHashMapTreeMapIterator to traverse collectionsDay-13-Collections/
│
├── Questions/
│ └── Questions.txt
│
├── Solutions/
│ ├── Q01_ArrayList.java
│ ├── Q02_ArrayList_User_Input.java
│ ├── Q03_LinkedList.java
│ ├── Q04_HashSet.java
│ ├── Q05_TreeSet.java
│ ├── Q06_HashMap.java
│ ├── Q07_TreeMap.java
│ ├── Q08_Iterator.java
│ ├── Q09_Sort_Collection.java
│ └── Q10_Remove_Duplicates.java
│
├── Screenshots/
│ ├── Output_1.png
│ ├── Output_2.png
│ ├── Output_3.png
│ ├── Output_4.png
│ ├── Output_5.png
│ ├── Output_6.png
│ ├── Output_7.png
│ ├── Output_8.png
│ ├── Output_9.png
│ └── Output_10.png
│
└── README.md
Create an ArrayList of names, add 5 names, and display all the names.
Solution: Q01_ArrayList.java

Get 5 numbers from the user, store them in an ArrayList, and calculate their sum.
Solution: Q02_ArrayList_User_Input.java

Create a LinkedList of fruits, add fruits, remove one fruit, and display the remaining fruits.
Solution: Q03_LinkedList.java

Create a HashSet containing duplicate numbers and observe that duplicate values are removed.
Solution: Q04_HashSet.java

Create a TreeSet containing numbers and display them in sorted order.
Solution: Q05_TreeSet.java

Create a HashMap containing student names and marks and display all key-value pairs.
Solution: Q06_HashMap.java

Create a TreeMap containing employee IDs and names and display the entries in sorted key order.
Solution: Q07_TreeMap.java

Create an ArrayList of names and use Iterator to display each name.
Solution: Q08_Iterator.java

Create an ArrayList of numbers and sort the numbers in ascending order.
Solution: Q09_Sort_Collection.java

Create an ArrayList containing duplicate numbers and remove the duplicate values using a collection.
Solution: Q10_Remove_Duplicates.java

Open PowerShell and navigate to the Solutions folder:
cd "C:\Disk D\Full Stack fol\JAVA-Daily-Tasks\Day-13-Collections\Solutions"
Compile all Java programs:
javac *.java
Run the programs individually:
java Q01_ArrayList
java Q02_ArrayList_User_Input
java Q03_LinkedList
java Q04_HashSet
java Q05_TreeSet
java Q06_HashMap
java Q07_TreeMap
java Q08_Iterator
java Q09_Sort_Collection
java Q10_Remove_Duplicates
| No. | Topic | Solution |
|---|---|---|
| Q01 | ArrayList | Q01_ArrayList.java |
| Q02 | ArrayList with User Input | Q02_ArrayList_User_Input.java |
| Q03 | LinkedList | Q03_LinkedList.java |
| Q04 | HashSet | Q04_HashSet.java |
| Q05 | TreeSet | Q05_TreeSet.java |
| Q06 | HashMap | Q06_HashMap.java |
| Q07 | TreeMap | Q07_TreeMap.java |
| Q08 | Iterator | Q08_Iterator.java |
| Q09 | Sort Collection | Q09_Sort_Collection.java |
| Q10 | Remove Duplicates | Q10_Remove_Duplicates.java |
Through these programs, I practiced:
ArrayListLinkedListHashSetTreeSetHashMapTreeMapIteratorCollections.sort()| Day | Topic | Status |
|---|---|---|
| Day 01 | Java Basics | Completed |
| Day 02 | Conditional Statements | Completed |
| Day 03 | Real-World Conditions | Completed |
| Day 04 | Loops | Completed |
| Day 05 | Number Programs | Completed |
| Day 06 | Pattern Programs | Completed |
| Day 07 | Arrays Basics | Completed |
| Day 08 | Arrays Problem Solving | Completed |
| Day 09 | String Basics | Completed |
| Day 10 | Methods | Completed |
| Day 11 | OOP Basics | Completed |
| Day 12 | OOP Advanced | Completed |
| Day 13 | Collections | Completed |
The goal of this daily Java practice is to strengthen Java fundamentals, Object-Oriented Programming concepts, Collections, logical thinking, problem-solving skills, and technical interview preparation.
Day 13 - Collections Completed ✅
Next: Day 14 - Exception & File Handling