First Round : Telephonic round
I was interviewing for Java developer post at Mumbai office of Morgan Stanley.
Interview mostly consisted of multi-threading questions and one data-structure and algorithm question.
Q.1> You are given are two threads (T1 and T2) for generation and two threads (T3 and T4) for validation. How do you make sure that T3 & T4 runs only after (T1 & T2).
Q.2> How do you make a class immutable? He then asked me what if the class have reference to some APIs which has setter methods. I couldn’t answer that.
Q.3> What is the difference between countdown *something* and *something*. Couldn’t hear properly.
Q.4> What is a volatile keyword?
Q.5> Difference between LinkedHashMap and HashMap
Q.6> DIfference between ConcurrentHashMap and SynchronizedHashMap.
Q.7> Given a linkedlist, how to do you find nth element from the last, if size of the LinkedList is unknown?
This article is contributed by Pramod Gupta. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.