Morgan Stanley Online Assessment, April 2025 - Associate Java Backend Hiring (2025)

morgan stanley logo
morgan stanley
Associate Java Backend Hiring
May 9, 20256 reads

Summary

I completed an online assessment for an Associate Java Backend role at Morgan Stanley, which consisted of four sections: Java MCQs, SQL querying, Java debugging, and a coding challenge.

Full Experience

HackerRank Online Assessment Experience (Java + SQL + Debugging) The test had 4 sections covering MCQs, SQL, bug fixing, and coding. Time -> 70 minutes.

📌 Section 1 – Java MCQs (4 Questions) Mix of single and multiple-choice questions focused on core Java concepts:

  1. Code snippet involving Stack vs Queue behavior. You had to predict the correct output based on insertion/removal order.
  2. Difference between Vector and ArrayList – mainly around synchronization and performance.
  3. Understanding the root cause of the Java Exception hierarchy – concepts of Throwable, Error, and Exception.
  4. Basic Java Garbage Collection question – when objects are eligible for GC, and what makes them unreachable.

📌 Section 2 – SQL Query Two tables were provided:

  • Table 1: id, email
  • Table 2: id, date

Task: Write a SQL query to fetch email IDs where the associated date falls on a weekend (Saturday/Sunday). Required good understanding of JOIN, DATE functions, and filtering logic. My Solution ->

SELECT t1.email, DAYNAME(t2.date) AS day_name
FROM table1 t1
JOIN table2 t2 ON t1.id = t2.id
WHERE DAYOFWEEK(t2.date) IN (1, 7);

📌 Section 3 – Java Debugging Task You were given a small Java web application with:

Controller, Service, Repository, Unit tests

Objective: Fix the bugs in the code so that all unit tests pass. This tested understanding of Spring Boot annotations, dependency injection, and logic errors.

📌 Section 4 – Password Validation Coding Question You were given a list of passwords and had to filter valid ones based on specific rules:

  • Password is valid if:
  • Length is greater than 5
  • It must not contain only characters or only digits

⚠️ Tricky part: Passwords with only special characters (like @#$%) were considered valid

Interview Questions (7)

Q1
Java Stack vs. Queue Output Prediction
Other

Code snippet involving Stack vs Queue behavior. You had to predict the correct output based on insertion/removal order.

Q2
Vector vs. ArrayList Differences
Other

Difference between Vector and ArrayList – mainly around synchronization and performance.

Q3
Java Exception Hierarchy
Other

Understanding the root cause of the Java Exception hierarchy – concepts of Throwable, Error, and Exception.

Q4
Java Garbage Collection Basics
Other

Basic Java Garbage Collection question – when objects are eligible for GC, and what makes them unreachable.

Q5
SQL Query: Emails on Weekends
OtherMedium

Two tables were provided:

  • Table 1: id, email
  • Table 2: id, date

Task: Write a SQL query to fetch email IDs where the associated date falls on a weekend (Saturday/Sunday). Required good understanding of JOIN, DATE functions, and filtering logic.

Q6
Java Spring Boot Debugging Task
Other

You were given a small Java web application with:

Controller, Service, Repository, Unit tests

Objective: Fix the bugs in the code so that all unit tests pass. This tested understanding of Spring Boot annotations, dependency injection, and logic errors.

Q7
Password List Validation
Data Structures & Algorithms

You were given a list of passwords and had to filter valid ones based on specific rules:

  • Password is valid if:
  • Length is greater than 5
  • It must not contain only characters or only digits

⚠️ Tricky part: Passwords with only special characters (like @#$%) were considered valid

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!