Upload Button Icon Add office photos

Morgan Stanley

Compare button icon Compare button icon Compare

Filter interviews by

Morgan Stanley Java Developer Interview Questions and Answers

Updated 26 Oct 2024

6 Interview questions

A Java Developer was asked
Q. What is the internal working of a CopyOnWrite ArrayList?
Ans. 

CopyOnWriteArrayList creates a new copy of the underlying array whenever an element is added, modified, or removed.

  • CopyOnWriteArrayList is thread-safe and suitable for scenarios where reads are more frequent than writes.

  • Adding, modifying, or removing elements in CopyOnWriteArrayList creates a new copy of the underlying array, ensuring thread safety.

  • Iterators on CopyOnWriteArrayList operate on the original array an...

A Java Developer was asked
Q. Can you explain the internal working of a hash map in Java?
Ans. 

HashMap in Java is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values based on keys.

  • HashMap internally uses an array of linked lists to store key-value pairs.

  • When a key-value pair is added, the key is hashed to find the index in the array where it will be stored.

  • If multiple keys hash to the same index, a linked list is used to handle collisions.

  • Retrieving a value involves ...

Java Developer Interview Questions Asked at Other Companies

asked in Deloitte
Q1. Sort 0 and 1 Problem Statement Given an integer array ARR of size ... read more
Q2. Parent class has run() and walk(). Parent run() calls walk(). Chi ... read more
asked in Infosys
Q3. Which should be preferred between String and StringBuffer when th ... read more
Q4. How do you sort a list of students based on their first name?
asked in Cognizant
Q5. What array list and linkedlist difference,how hashmap internally ... read more
A Java Developer was asked
Q. 

Max Element After Update Operations

Given an array A of size N, initialized with all zeros, and another array ARR of M pairs of integers representing operations. Each operation consists of a range where ea...

Ans. 

Find the maximum element in an array after performing a series of increment operations on specified ranges.

  • Initialize an array of size N with all zeros

  • Iterate through the operations and increment elements within specified ranges

  • Return the maximum element in the array after all operations

A Java Developer was asked
Q. How can you print even and odd numbers in increasing order using two threads in Java?
Ans. 

Use two threads to print even and odd numbers in increasing order.

  • Create two threads, one for printing even numbers and one for printing odd numbers.

  • Use a shared variable to keep track of the current number to be printed.

  • Synchronize access to the shared variable to ensure correct ordering of numbers.

  • Use a loop in each thread to print the next number and update the shared variable.

A Java Developer was asked
Q. What are the differences between Synchronized Collection and Concurrent Collection in Java?
Ans. 

Synchronized Collection is thread-safe but may have performance issues, while Concurrent Collection is optimized for concurrent access.

  • Synchronized Collection uses synchronized keyword to achieve thread-safety, while Concurrent Collection uses non-blocking algorithms like CAS (Compare and Swap).

  • Synchronized Collection locks the entire collection during modification, leading to potential performance bottlenecks, wh...

A Java Developer was asked
Q. Why do we need to override the equals and hashCode methods in Java?
Ans. 

Overriding equals and hashCode methods in Java is important for proper object comparison and hashing.

  • Equals method is used to compare two objects for equality, while hashCode method is used to generate a unique integer value for an object.

  • By overriding equals and hashCode methods, we can ensure that objects are compared based on their actual content rather than memory address.

  • This is crucial for collections like H...

Morgan Stanley Java Developer Interview Experiences

3 interviews found

Interview experience
4
Good
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Company Website and was interviewed in Sep 2024. There was 1 interview round.

Round 1 - Technical 

(2 Questions)

  • Q1. Quick sort - keep order same
  • Ans. 

    Quick sort can be modified to maintain the order of equal elements, known as stable quick sort.

    • Stable quick sort uses a modified partitioning method to keep equal elements in their original order.

    • Example: For array ['apple', 'banana', 'apple', 'orange'], stable sort keeps the first 'apple' before the second.

    • Using a stable sorting algorithm like merge sort can also achieve the same result if quick sort isn't stable.

  • Answered by AI
  • Q2. Reverse string with spaces but keep the space position intact

Interview Preparation Tips

Interview preparation tips for other job seekers - Study DSA properly and java basics - immutable class cases
Interview experience
3
Average
Difficulty level
-
Process Duration
-
Result
Not Selected

I applied via Naukri.com and was interviewed in Jan 2024. There was 1 interview round.

Round 1 - Coding Test 

Round 1 was an online hackerank coding test + technical MCQs.

It consisted of 5 MCQs + 1 SQL problem + 1 DSA problem based on queue + 1 Graph question + 1 java based question to create a REST API.

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare well for any type of DSA problems for level medium to difficult.

I appeared for an interview in Oct 2021.

Round 1 - Video Call 

(3 Questions)

Round duration - 60 minutes
Round difficulty - Easy

Technical Interview round with questions on DSA and Java.

  • Q1. 

    Max Element After Update Operations

    Given an array A of size N, initialized with all zeros, and another array ARR of M pairs of integers representing operations. Each operation consists of a range where e...

  • Ans. 

    Find the maximum element in an array after performing a series of increment operations on specified ranges.

    • Initialize an array of size N with all zeros

    • Iterate through the operations and increment elements within specified ranges

    • Return the maximum element in the array after all operations

  • Answered by AI
  • Q2. Can you explain the internal working of a hash map in Java?
  • Ans. 

    HashMap in Java is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values based on keys.

    • HashMap internally uses an array of linked lists to store key-value pairs.

    • When a key-value pair is added, the key is hashed to find the index in the array where it will be stored.

    • If multiple keys hash to the same index, a linked list is used to handle collisions.

    • Retrieving a value involves hashi...

  • Answered by AI
  • Q3. Why do we need to override the equals and hashCode methods in Java?
  • Ans. 

    Overriding equals and hashCode methods in Java is important for proper object comparison and hashing.

    • Equals method is used to compare two objects for equality, while hashCode method is used to generate a unique integer value for an object.

    • By overriding equals and hashCode methods, we can ensure that objects are compared based on their actual content rather than memory address.

    • This is crucial for collections like HashMa...

  • Answered by AI
Round 2 - Video Call 

(3 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Technical Interview round with questions based around Java.

  • Q1. How can you print even and odd numbers in increasing order using two threads in Java?
  • Ans. 

    Use two threads to print even and odd numbers in increasing order.

    • Create two threads, one for printing even numbers and one for printing odd numbers.

    • Use a shared variable to keep track of the current number to be printed.

    • Synchronize access to the shared variable to ensure correct ordering of numbers.

    • Use a loop in each thread to print the next number and update the shared variable.

  • Answered by AI
  • Q2. What is the internal working of a CopyOnWrite ArrayList?
  • Ans. 

    CopyOnWriteArrayList creates a new copy of the underlying array whenever an element is added, modified, or removed.

    • CopyOnWriteArrayList is thread-safe and suitable for scenarios where reads are more frequent than writes.

    • Adding, modifying, or removing elements in CopyOnWriteArrayList creates a new copy of the underlying array, ensuring thread safety.

    • Iterators on CopyOnWriteArrayList operate on the original array and do ...

  • Answered by AI
  • Q3. What are the differences between Synchronized Collection and Concurrent Collection in Java?
  • Ans. 

    Synchronized Collection is thread-safe but may have performance issues, while Concurrent Collection is optimized for concurrent access.

    • Synchronized Collection uses synchronized keyword to achieve thread-safety, while Concurrent Collection uses non-blocking algorithms like CAS (Compare and Swap).

    • Synchronized Collection locks the entire collection during modification, leading to potential performance bottlenecks, while C...

  • Answered by AI

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAMorgan Stanley interview preparation:Topics to prepare for the interview - Java, Data Structures, Algorithms, System Design, OOPSTime required to prepare for the interview - 4 monthsInterview preparation tips for other job seekers

Tip 1 : Thread concept is must for Morgan Stanley. So prepare that on priority
Tip 2 : Basic concepts of Oops/collection framework should be clear. 
Tip 3 : Array based program will be asked so have some hands-on.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewRejected

Skills evaluated in this interview

Top trending discussions

View All
Interview Tips & Stories
2w
toobluntforu
·
works at
Cvent
Can speak English, can’t deliver in interviews
I feel like I can't speak fluently during interviews. I do know english well and use it daily to communicate, but the moment I'm in an interview, I just get stuck. since it's not my first language, I struggle to express what I actually feel. I know the answer in my head, but I just can’t deliver it properly at that moment. Please guide me
Got a question about Morgan Stanley?
Ask anonymously on communities.

Interview questions from similar companies

I applied via Referral and was interviewed before Nov 2020. There were 3 interview rounds.

Interview Questionnaire 

2 Questions

  • Q1. What is bond?
  • Ans. 

    A bond is a debt security that represents a loan made by an investor to a borrower.

    • Bonds are issued by corporations, municipalities, and governments to raise capital.

    • They have a fixed interest rate and a maturity date when the principal is repaid.

    • Bonds are generally considered less risky than stocks but offer lower potential returns.

    • Investors can buy and sell bonds on the secondary market.

    • Examples of bonds include U.S....

  • Answered by AI
  • Q2. What is Fund Accounting?
  • Ans. 

    Fund Accounting is a specialized accounting system used by non-profit organizations and government agencies to track and manage funds.

    • It involves tracking and reporting on the financial activity of specific funds or grants.

    • It ensures that funds are used for their intended purposes and that financial reports are accurate and transparent.

    • Examples include tracking donations to a non-profit organization or managing governm...

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Good easy & simple, mostly the questions relate to your CV and family background some are from Financial terms

I appeared for an interview before Sep 2020.

Round 1 - Face to Face 

(1 Question)

Round duration - 30 minutes
Round difficulty - Easy

It was in the day time. I was asked the programming language of my choice. It was mostly focused on programming fundamentals. I was asked 2 questions based on Data Structures and Algorithms.

  • Q1. How can you detect a loop in a linked list?
  • Ans. 

    A loop in a linked list can be detected using Floyd's Cycle Detection Algorithm.

    • Use two pointers - slow and fast, where slow moves one step at a time and fast moves two steps at a time.

    • If there is a loop, the two pointers will eventually meet at some point within the loop.

    • To detect the start of the loop, reset one pointer to the head and move both pointers one step at a time until they meet again.

  • Answered by AI
Round 2 - Face to Face 

(1 Question)

Round duration - 30 minutes
Round difficulty - Easy

This round was mostly focused on my resume and projects.

  • Q1. Tell me about your projects.
Round 3 - Face to Face 

Round duration - 30 minutes
Round difficulty - Easy

It was in the evening. I went to their office in Gurgaon. It was taken by one of the technology director who had a lot of experience. 
 

Interview Preparation Tips

Professional and academic backgroundI completed Information Technology from Bharati Vidyapeeth's College of Engineering. I applied for the job as SDE - 1 in GurgaonAmerican Express interview preparation:Topics to prepare for the interview - Data structures and algorithms, Object-Oriented Programming System concepts, Database Management System, Operating System, Networking.Time required to prepare for the interview - 2 MonthsInterview preparation tips for other job seekers

Do practice a lot of data structures questions as mostly questions in interviews are based on them. Also, do prepare for projects mentioned in your resume and skills which you have mentioned. Coding ninjas has a big hand in making my interview clear as I have taken a course from the coding Ninjas which helped me a lot to make my concepts clear.

Application resume tips for other job seekers

Keep it short and crisp. Go through it properly before the interview. Make sure that you haven't put anything in it that can cause you problems during the interview.

Final outcome of the interviewSelected

Skills evaluated in this interview

I appeared for an interview in May 2017.

Interview Questionnaire 

6 Questions

  • Q1. Can string class be extended
  • Ans. 

    Yes, the string class can be extended in most programming languages.

    • Inheritance can be used to extend the functionality of the string class.

    • By creating a new class that inherits from the string class, additional methods and properties can be added.

    • Extending the string class allows for customization and adding specific functionality to strings.

    • Example: In Python, the string class can be extended by creating a new class ...

  • Answered by AI
  • Q2. What are the implecit object in JSP
  • Ans. 

    Implicit objects in JSP are predefined objects that are available for use without any declaration or initialization.

    • Implicit objects in JSP include request, response, session, application, out, config, pageContext, page, exception, and others.

    • These objects provide access to various aspects of the JSP environment and can be used to perform common tasks.

    • For example, the request object allows access to HTTP request parame...

  • Answered by AI
  • Q3. How does hash map works
  • Ans. 

    A hash map is a data structure that uses a hash function to map keys to values.

    • Hash map stores key-value pairs

    • It uses a hash function to compute an index for each key

    • Collisions can occur when two keys hash to the same index

    • Hash maps provide fast access to values based on their keys

  • Answered by AI
  • Q4. Difference between string buffer and string builder
  • Ans. 

    StringBuffer and StringBuilder are both used to manipulate strings, but StringBuffer is thread-safe while StringBuilder is not.

    • StringBuffer is synchronized, making it safe for use in multi-threaded environments.

    • StringBuilder is not synchronized, making it faster but not thread-safe.

    • StringBuffer is preferred when multiple threads are involved, while StringBuilder is preferred for single-threaded scenarios.

    • Both classes p...

  • Answered by AI
  • Q5. What is MVC
  • Ans. 

    MVC is a software architectural pattern that separates an application into three main components: Model, View, and Controller.

    • Model represents the data and business logic of the application.

    • View is responsible for displaying the user interface.

    • Controller handles user input, updates the model, and interacts with the view.

    • MVC promotes separation of concerns and modularity in software development.

    • Example: In a web applica...

  • Answered by AI
  • Q6. What are the annotation used in RESTFULL web services
  • Ans. 

    Annotations used in RESTful web services

    • 1. @Path - Specifies the URI path for the resource

    • 2. @GET - Specifies that the method handles HTTP GET requests

    • 3. @POST - Specifies that the method handles HTTP POST requests

    • 4. @PUT - Specifies that the method handles HTTP PUT requests

    • 5. @DELETE - Specifies that the method handles HTTP DELETE requests

    • 6. @PathParam - Binds the value of a URI template parameter to a method paramete...

  • Answered by AI

Interview Preparation Tips

Skills: Java Application Development

Skills evaluated in this interview

Interview Questionnaire 

2 Questions

  • Q1. Demonetization
  • Q2. Banking sector questions

Interview Preparation Tips

Round: Test
Experience: Basic aptitude test. East to clear.
Duration: 1 hour
Total Questions: 25

Skills: Reasoning Ability, Mathematical Logic, Logical Reasoning, General Knowledge
College Name: Sri Bhagawan Mahaveer Jain
Are these interview questions helpful?

I applied via Referral

Interview Questionnaire 

4 Questions

  • Q1. Brief introduction,,
  • Q2. Why markets?
  • Ans. 

    Markets offer dynamic and challenging environments that require constant adaptation and innovation.

    • Markets provide opportunities for growth and expansion

    • Competition in markets drives innovation and efficiency

    • Markets offer diverse career paths and opportunities for personal development

  • Answered by AI
  • Q3. 2-3 puzzles,
  • Q4. Economics questions

Interview Preparation Tips

Round: Technical Interview
Experience: No. of Interviews: 1
I think they were looking for Mathematical and analytical ability, Awareness about and aptitude for finance related stuff (news items, their analysis, my understanding etc.)

Tips: Being prepared: In markets there is no substitute to knowing your stuff. You can‟t faff your way through as the questions will be technical

Skills: Financial Markets, Aptitude, Analytical Skills, Mathematical Aptitude
College Name: IIM Bangalore

Interview Preparation Tips

Round: Test
Experience: The test was for two and half hours where 1 hour was for general aptitude, 1 hr was for coding aptitude(either on java or C or C++as you choose) and 1/2 an hour for two coding questions.

Round: Technical Interview
Experience: In technical round they asked puzzles, aptitude questions and basic C coding. I was asked to write the code for two questions(one was on sort and search) and was asked the logic of two questions.They asked basics of linked lists, stacks, queues. Infact they were not very interested in the syntax and were pressing on the logic

General Tips: Being a non software branch students is not at all a problem. The company took 4 interns where 3 were from core branches. The fact that we had to work in JAVA and most of us didn't know JAVA, the company only looks for aptitude and ability to learn. So if you don't know anything, tell frankly that you don't know that part, rather than guessing. Be thorough with what you know and confidentially answer all the questions.
Also do not be tensed and take things lightly, if the interviewer is joking. Be candid.
Skill Tips: Learn basics of coding from books . Aptitude can be done from sites likes geeks for geeks, etc. The level of aptitude is not very high and infact the coding aptitude is also theoretical and does not involve in depth knowledge.
Skills:
College Name: NIT Surathkal

Interview Preparation Tips

Round: Test
Experience: Online Test (General aptitude, C aptitude ,Programming problems).

General Tips: Study basics of C and DSA well. Utilize the last summer vacations for studying for placements. Be confident and Honest.
Yes it is challenging and exhausting. It tests your patience. But final reward is also great so we must keep going toward it.
Skill Tips: Online coding sites such as Codechef, etc. Narasimha Karumanchi for data structures and algorithm will help in preparation.
Skills:
College Name: NIT Surathkal

Morgan Stanley Interview FAQs

How many rounds are there in Morgan Stanley Java Developer interview?
Morgan Stanley interview process usually has 1 rounds. The most common rounds in the Morgan Stanley interview process are Coding Test and Technical.
How to prepare for Morgan Stanley Java Developer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Morgan Stanley. The most common topics and skills that interviewers at Morgan Stanley expect are Investment Banking, Financial Services, Core Java, Unix and Wealth Management.
What are the top questions asked in Morgan Stanley Java Developer interview?

Some of the top questions asked at the Morgan Stanley Java Developer interview -

  1. Reverse string with spaces but keep the space position int...read more
  2. Quick sort - keep order s...read more

Tell us how to improve this page.

Overall Interview Experience Rating

3.5/5

based on 2 interview experiences

Difficulty level

Moderate 100%

Duration

Less than 2 weeks 100%
View more
Morgan Stanley Java Developer Salary
based on 46 salaries
₹13 L/yr - ₹23 L/yr
178% more than the average Java Developer Salary in India
View more details
Associate
3.5k salaries
unlock blur

₹10 L/yr - ₹17 L/yr

Senior Manager
2.5k salaries
unlock blur

₹26.1 L/yr - ₹47.3 L/yr

Manager
1.9k salaries
unlock blur

₹17.8 L/yr - ₹32.4 L/yr

Senior Associate
1.7k salaries
unlock blur

₹12.8 L/yr - ₹22 L/yr

Vice President
1.4k salaries
unlock blur

₹38.8 L/yr - ₹71.2 L/yr

Explore more salaries
Compare Morgan Stanley with

JPMorgan Chase & Co.

3.9
Compare

Goldman Sachs

3.5
Compare

TCS

3.6
Compare

Deloitte

3.7
Compare
write
Share an Interview