Thursday, July 3, 2025

Can You Make an Array or ArrayList Volatile in Java?

This is one of the many interesting multi-threading questions I have shared in my post 50 multi-threading interview questions. Yes, you can make an array volatile in Java, there is no problem with that, neither compiler will flag any error not JVM will throw any exception but the tricky part is why you want to make an array volatile and what is the effect of making an array volatile in Java? In order to answer this question, you must be familiar with both volatile modifier and Java memory model, otherwise, it would be difficult to answer, and that's why it's also one of the trick questions from Java interviews. Before answering this question in detail, let's first revise what is a volatile keyword in Java and what kind of guarantee it provides in the context of multithreading and concurrency.

Friday, May 23, 2025

Top 5 Free Udemy Courses to Learn Java Multithreading and Concurrency in 2025 - Best of Lot

Hello guys, if you want to learn multithreading and concurrency in Java and looking for best free resources like online courses and tutorials then you have come to the right place. Earlier, I have shared best free Java Courses and best free Spring Framework courses and today, I will share best free online courses to learn Multithreading and Concurrency in Java. Multithreading is one of the important skill for Java programmers as companies are always in hunt of Java programmer who are good at multithreading and concurrency but at the same time its very hard topic to master. Acquiring solid multithreading and concurrency skill require a lot of hard worked and years of experience but you can speed up by joining best Java multithreading courses and learning from expert.

Wednesday, February 5, 2025

Top 5 Books to Learn Concurrent Programming and Multithreading in Java in 2025 - Best, Must Read

Books are essential to learning something new, and despite being in the electronic age, where books have lost some shine to the internet and blogs, I still read and recommend them to get complete and authoritative knowledge on any topic, like concurrent programming. In this article, I will share five best books to learn concurrent programming in Java. These books cover basics, starting from how to create and start a thread, parallel programming, concurrency design patterns, an advantage of concurrency and of course pitfalls, issues, and problems introduced due to multithreading. Learning concurrent programming is a difficult task, not even in Java but also in other languages like C++ or modern days JVM languages like Groovy, Scala, Closure, and JRuby.