Compare the performance of AtomicLong and LongAdder classes
LongAdder class is added in Java 8. Official Java docs say: Under high contention, expected throughput of this class compared to AtomicLong is significantly…
Java, Performance Optimization
0
Why do we use private mutex?
You may see something like this: And you start wondering: “Hey, why do we use synchronized (mutex), can’t we just use synchronized…
How to make a major mistake with improper publication of the object
First, we need to define an improper publication. If in thread A you create the object X and in the…
How many problems can you spot in this simple code?
Let’s try to create a program that runs ten threads and every thread adds a thousand numbers to the list….
Become Java Backend Developer From Scratch
The main purpose of this course/playlist is to introduce you into the IT world. Specifically, this course covers backend development…