morgan stanley logo
Morgan Stanley· Associate Java Backend Hiring

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

Posted
9 May 2025
331 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.

How it went

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

Questions asked (7)

  1. 01

    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.

  2. 02

    Vector vs. ArrayList Differences

    Other

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

  3. 03

    Java Exception Hierarchy

    Other

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

  4. 04

    Java Garbage Collection Basics

    Other

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

  5. 05

    SQL Query: Emails on Weekends

    Other · Medium

    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.

  6. 06

    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.

  7. 07

    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

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Morgan Stanley recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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