Javarevisited

Learn Java, Programming, Spring, Hibernate throw tutorials, examples, and interview questions

Sunday, September 17, 2023

How Thread, Code and Data Works in Multi-threading Program in Java?

›
There are certain things, which you don't learn in academics or training class, you develop those understanding after few years of work...
2 comments:

How Volatile in Java works? Example of volatile keyword in Java

›
What is a volatile variable in Java and when to use the volatile variable in Java is a famous multi-threading interview question in Java in...
57 comments:

How to create Thread Pool in Java using Executor Framework - Example Tutorial

›
Java 1.5 introduced a Thread pool in Java in the form of an Executor framework, which allows Java programmers to decouple submission of a ...
8 comments:

How to use Callable and Future in Java? Example Tutorial

›
A callable interface was added in Java 5 to complement the existing Runnable interface, which is used to wrap a task and pass it to a Threa...
2 comments:

How to use wait, notify and notifyAll in Java - Producer Consumer Example

›
You can use wait, notify, and notifyAll methods to communicate between threads in Java. For example, if you have two threads running in you...
28 comments:

How to use Lock and Condition variable in Java? Producer Consumer Problem Example Tutorial

›
You can also solve the producer-consumer problem by using a new lock interface and condition variable instead of using the synchronized key...
7 comments:
Saturday, September 16, 2023

What is compound assignment operator +=, -=, *= and /= in Java? Example Tutorial

›
Many Java programmers think that a += b is just a shortcut of a = a + b, which is only half correct. Though it expands exactly like that and...

How to use SynchronousQueue in Java? Prouder Consumer Example

›
SynchronousQueue is a special kind of BlockingQueue in which each inserts operation must wait for a corresponding remove operation by anoth...
11 comments:

What is volatile modifier or field in Java? Example Tutorial

›
The volatile modifier has always been an interesting and tricky topic for many Java programmers. I still feel that it's one of the mos...
1 comment:

How to use Future and FutureTask in Java Concurrency with Example

›
Future and FutureTask in Java allows you to write asynchronous code. The Future is a general concurrency abstraction, also known as a promi...
11 comments:
Friday, September 15, 2023

How to create thread safe Singleton in Java - Java Singleton Example

›
Thread safe Singleton means a Singleton class that returns exactly the same instance even if exposed to multiple threads. Singleton in Jav...
12 comments:

How to Stop a Thread in Java? Code Example

›
The thread is one of the important Classes in Java and multithreading is the most widely used feature, but there is no clear way to stop T...
18 comments:

What is ReentrantLock in Java? Difference between synchronized vs ReentrantLock with Example

›
ReentrantLock in Java is added on java.util.concurrent package in Java 1.5 along with other concurrent utilities like CountDownLatch , Exe...
15 comments:

The Ultimate Guide of Synchronization in Java - Examples

›
Multithreading and synchronization are a very important topic for any Java programmer. Good knowledge of multithreading, synchronization,...
42 comments:

How to use Counting Semaphore in Concurrent Java Application? Example Tutorial

›
Counting Semaphore in Java is a synchronizer that allows imposing a bound on the resource is added in Java 5 along with other popular con...
5 comments:
‹
›
Home
View web version

Contributors

  • SimpleJava
  • javin paul
Powered by Blogger.