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 list is a little bit different and I encourage you to share questions and answers in a similar way so that it should be easy to revise.
I have also worked hard to keep this list You guys are also lucky that nowadays there are some good books available to prepare for Java interviews, one of them which I particularly find useful and interesting to read is Java Programming Interview Exposed by Markham.
No matter whether you are a Java developer of 1, 2, 3, 4, 5, 6, 8, 9 or even 10 years of experience, you will find something interesting in this list.
It contains questions which are super easy to answer, and also, a question which is tricky enough for even seasoned Java programmers.
Both double and long are 64-bit wide and they are read in two parts, first 32-bit first time and next 32-bit second time, which is non-atomic but volatile double and long read is atomic in Java.
Another use of the volatile variable is to provide a memory barrier, just like it is used in framework.