Skip to content

Explore Java Collections Framework and Multithreading with this repository. From ArrayLists to ThreadPool usage, find hands-on examples to enhance your Java skills.

Notifications You must be signed in to change notification settings

krishnamodi-1108/Java_Collections_Threads

Repository files navigation

Java Collections & Threads

This project includes Java programs demonstrating the use of collections framework and multithreading concepts.

Collection Framework

Task 1: ArrayList

  • File: CollectionFrameworkTask1.java
  • Creates an ArrayList of integers and prints the group of integers.

Task 3: HashSet

  • File: CollectionFrameworkTask3.java
  • Uses a HashSet to store a group of integers, demonstrating unique element storage.

Task 4: ArrayDeque

  • File: CollectionFrameworkTask4.java
  • Implements a Queue using ArrayDeque and performs operations like insertion and removal of elements.

Task 5: PriorityQueue

  • File: CollectionFrameworkTask5.java
  • Utilizes a PriorityQueue to insert and remove elements, showcasing the priority-based ordering.

Multithreading

Runnable Task

  • File: RunnableTask.java
  • Implements a simple thread using the Runnable interface.

Thread Greetings

  • Files: HumanGreeting.java, ThreadPoolTask1.java, CountryGreeting.java, ThreadPoolTask2.java, ThreadTask.java
  • Demonstrates basic thread creation and execution with greetings.

ThreadPool

  • Files: ThreadPoolTask3.java, WorkerThread.java
  • Illustrates the use of a thread pool using ExecutorService and creating worker threads for concurrent processing.

How to Run

  1. Clone the repository:

    git clone https://github.com/krishna-kusum/Java_Collections_Threads.git
    cd Java_Collections_Threads
  2. Compile and run the Java files using a Java compiler and the Java command. Feel free to explore each task's code for detailed comments and insights.

If you find any issues or have suggestions for improvement, feel free to contribute or open an issue.

About

Explore Java Collections Framework and Multithreading with this repository. From ArrayLists to ThreadPool usage, find hands-on examples to enhance your Java skills.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages