
“Just as it is a good practice to make all fields private unless they need greater visibility, it is a good practice to make all fields final unless they need to be mutable.”
― Java Concurrency in Practice
― Java Concurrency in Practice
“Sometimes abstraction and encapsulation are at odds with performance — although not nearly as often as many developers believe — but it is always a good practice first to make your code right, and then make it fast.”
― Java Concurrency in Practice
― Java Concurrency in Practice
“Locking can guarantee both visibility and atomicity; volatile variables can only guarantee visibility.”
― Java Concurrency in Practice
― Java Concurrency in Practice
“It is far easier to design a class to be thread-safe than to retrofit it for thread safety later.”
― Java Concurrency in Practice
― Java Concurrency in Practice
“Whenever more than one thread accesses a given state variable, and one of them might write to it, they all must coordinate their access to it using synchronization.”
― Java Concurrency in Practice
― Java Concurrency in Practice
Deepesh’s 2024 Year in Books
Take a look at Deepesh’s Year in Books, including some fun facts about their reading.
More friends…
Polls voted on by Deepesh
Lists liked by Deepesh