Updating a hashmap

concurrency, algorithms, data structures and coding. Since I like to explore interview questions, I have got this huge list of questions with me, which contains lots and lots of questions on different topics.I have been preparing this MEGA list for quite some time and now It's ready to share with you guys.I am sure you have seen many of these questions personally on your interviews and many of you would have answered them correctly as well. This is one of the tricky Java multi-threading questions you will see in senior Java developer Interview.Yes, you can make an array volatile in Java but only the reference which is pointing to an array, not the whole array.

why I like that question, what makes them challenging and what kind of answer you should expect from candidates.It contains interview questions not only from classic topics like threads, collections, equals and hashcode, sockets but also from NIO, array, string, Java 8 and much more.It has questions for both entry-level Java programmers and senior developers with years of experience.This another good question I love to ask on volatile, mostly as a follow-up of the previous question.This question is also not easy to answer because volatile is not about atomicity, but there are cases where you can use a volatile variable to make the operation atomic.

Leave a Reply