Morgan Stanley Interview Questions – Set 6
I have appeared for Sr Java Developer position at Synechron Technologies. I cleared three F2F interview rounds of Synechron. I had also cleared two telephonic rounds with Synechron's client Morgan Stanley.
After that I was invited for last two F2F rounds with Morgan Stanley at Bangalore. Overall experience was very good. Synechron has provided TO and FRO flight tickets from Ahmedabad to Bangalore as well as Cab for full day transportation in Bangalore.
First F2F interview with Morgan Stanley
- Tell me about your current project and technologies you have worked on.
- What is the difference between fail-safe and fail-fast iterators?
- Write a program to implement LRU Cache.
-
Write a program to implement stack which always maintains pointer to minimum element of the stack. You can use
push()
andpop()
methods of jdk Stack Implementation. - How to read multiple files from one specific location on the memory using multiple threads? At a time maximum 10 threads should read different files concurrently.
- What all design patterns have u worked on?
- Write a program for Observer Design Pattern.
- Suppose you have a table with no primary key. There are duplicate records in that table. Write a SQL query to remove unnecessary duplicate records.
-
Suppose you have below
account_table
Account_Id | Transaction_Type | Amount |
---|---|---|
100 | Credit | 2000 |
100 | Debit | 300 |
100 | Credit | 99 |
101 | Credit | 500 |
Write a query to fetch result as below
Account_Id | Net_Balance |
---|---|
100 | 1799 |
101 | 500 |
select Account_Id, Sum(Decode(Transaction_Type, 'Credit', Amount, 'Debit', -Amount)) "Net_Balance" from Account_table group by Account_Id;
- What do u use for Unit Testing in your project?
- Which mocking frameworks have u used for JUnit testing?
Second F2F interview with Morgan Stanley
- Introduce yourself.
- Tell me about your current project.
- Tell me about your greatest achievement in your current project.
- When it is recommanded to use fail-safe iterators over fail-fast iterators.
- What are the pros and cons of Hibernate over Spring JDBC?
- Which tool do you use in current project to identify performance related issues?
- How will you identify the cause of OutOfMemoryErrors in your application?
- When is it recommended to change the JVM configuration to avoid OutOfMemory error?
- Write a program to implement Producer Consumer Design Pattern.
- Write a program to evaluate a given mathematical expression.
For Example,
1 + 2 * 3 Answer : 7
1 + 2 – 3 Answer : 0
4 / 4 * 4 Answer : 4
Note :
* and / has equal precedence.
+ and – has equal precedence.
Assume that * and / has greater precedence over + and -.
if two operators have equal precedence, then operator on the left side should be given a priority.
This article is contributed anonymously by one of the CodePumpkin user. If you would also like to contribute your article or share interview experiences, you can create contributor account with CodePumpkin by clicking here or you can send us a mail at admin@codepumpkin.com.
That's all for this topic. If you guys have any suggestions or queries, feel free to drop a comment. We would be happy to add that in our post. You can also contribute your articles by creating contributor account here.
Happy Learning 🙂
If you like the content on CodePumpkin and if you wish to do something for the community and the planet Earth, you can donate to our campaign for planting more trees at CodePumpkin Cauvery Calling Campaign.
We may not get time to plant a tree, but we can definitely donate ₹42 per Tree.
About the Author
Tags: Core Java, Design Patterns, Java, Java Memory Model, JVM internals, Multithreading, SQL, Synchronization
Comments and Queries
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:<pre><code class="java"> String foo = "bar"; </code></pre>For more information on supported HTML tags in disqus comment, click here.