Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (3.9k points)

After reading Hidden Features of C# I wondered, What are some of the hidden features of Java?

1 Answer

0 votes
by (46k points)

Double Brace Initialization took me by wonder a few months ago when I first saw it, never learned of it before.

ThreadLocals are typically not so generally known as a way to save per-thread state.

Since JDK 1.5 Java has had remarkably well implemented and robust concurrency mechanisms beyond just locks, they live in java.util.concurrent and a particularly impressive example is the java.util.concurrent.atomic subpackage that includes thread-safe primitives that perform the compare-and-swap operation and can map to original native hardware-supported transcriptions of these operations.

Related questions

0 votes
1 answer
asked Oct 13, 2019 in Java by Ritik (3.5k points)
0 votes
1 answer
asked Apr 2, 2021 in Java by dev_sk2311 (45k points)
0 votes
1 answer
asked Mar 23, 2021 in Java by dev_sk2311 (45k points)
0 votes
1 answer

Browse Categories

...