Have a Question?

If you have any question you can ask below or enter what you are looking for!

Category: Multi Threading

What is Daemon thread and How to make Daemon thread?

What is Daemon thread and How to make Daemon thread?

What is Daemon thread and How to make Daemon thread? The threads which are executing in the background are called Demon threads. Ex… Garbage Collector, Signal Dispatcher, Attach Listener. The main objective of demon threads is to provide support for non-demon threads(main thread) For ex… If the main thread runs . . . Read more

What is DeadLock and difference between DeadLock and Starvation?

What is DeadLock and difference between DeadLock and Starvation?

What is DeadLock and difference between DeadLock and Starvation? If two threads are waiting for each other forever such type of infinite waiting is called deadlock. Synchronized is the only reason for deadlock situation hence while using synchronized keyword we have to take special care. There is no resolution technique . . . Read more

What is synchronization and why it is important?

What is synchronization and why is it important?

What is synchronization and why it is important? Synchronized is the modifier applicable only for methods and blocks but not for classes and variables. If multiple threads are trying to operate simultaneously on the same java object then there may be a chance of data-inconsistency problem. To overcome this problem we should go . . . Read more

Difference between yield(), join(), sleep() method?

Difference between yield(), join(), sleep() method?

Difference between yield(), join(), sleep() method? We can prevent thread execution by using the following method. yield() join() sleep() public static native void yield()  yield() method causes to pause current executing thread to give the chance for waiting threads of the same priority. If there is no waiting thread or . . . Read more