Tag Archives: Java-Multithreading

Threads in java are the lightweight sub-processes that can be created by the user. It is used to perform complicated tasks in the background without… Read More
Sleep(): This Method is used to pause the execution of current thread for a specified time in Milliseconds. Here, Thread does not lose its ownership… Read More
Thread is a lightweight process. A process in execution is called a program. A subpart of a program is called a thread. Threads allow a… Read More
The suspend() method of thread class puts the thread from running to waiting state. This method is employed if you would like to prevent the… Read More
The getId() method of Thread class returns the identifier of the invoked thread. The thread ID is a positive long number generated when this thread… Read More
Prerequisites: Socket Programming in Java Multithreaded Server: A server having more than one thread is known as Multithreaded Server. When a client sends the request,… Read More
In spite of the fact that both CountDownLatch and CyclicBarrier are utilized as a synchronization help that permits at least one threads to wait however… Read More
Prerequisite: Multithreading Given an integer N, the task is to write Java Program to print the first N natural numbers in increasing order using two… Read More
As we know Java has a feature, Multithreading, which is a process of running multiple threads simultaneously. When multiple threads are working on the same… Read More
QuickSort is a popular sorting technique based on divide and conquer algorithm. In this technique, an element is chosen as a pivot and the array… Read More
An exception is an unwanted or unexpected event, which occurs during the execution of a program i.e at run time, that disrupts the normal flow… Read More
In mutithreading, the shared entity mostly leads to a problem when concurrency is incorporated. A shared entity such as, mutable object or variable, might be… Read More
Slipped Condition is a special type of race condition that can occur in a multithreaded application. In this, a thread is suspended after reading a… Read More
What is message passing and why it is used? Message Passing in terms of computers is communication between processes. It is a form of communication… Read More
Prerequisite: Different Approaches to Concurrent Programming in Java Lambda expressions are very similar in behaviour to anonymous inner classes. They have complete access to code… Read More