JP Morgan Chase | Software Engineer 3 | Bengaluru | April 2026 | Interview Experience
- Location
- Bengaluru
- Posted
- 20 Apr 2026
Summary
I interviewed for a Software Engineer 3 role at JPMorgan Chase in Bengaluru, undergoing two rounds that emphasized core Java fundamentals, OOP design, and algorithmic problem solving.
How it went
Hi everyone! I wanted to share the questions from my recent JP Morgan interview rounds. The process was very focused on Core Java internals, clean OOP design, and logical problem-solving.
Round 1: Java Fundamentals & Backend Logic
Section 1: Java Core & Collections Internals
HashMap Logic Test: Given a Person class (fields: id, name, salary).
If you create three objects: p1(1, "A", 30), p2(2, "B", 60), and p3(1, "A", 30).
If you put all three into a HashMap<Person, Integer>, what will map.size() and map.get() return for each?
Follow-up: Explain the behavior if hashCode() and equals() are overridden vs. if they are not.
Section 2: Sorting & Comparators
Custom Sorting: How do you sort a list of Person objects in descending order by name, and if names are equal, in ascending order by salary? Discuss the choice between Comparable and Comparator.
Section 3: Object-Oriented Design & Immutability
Creating Immutable Classes: How do you make a Java class immutable (mentioning access modifiers, final, etc.)?
Immutability with References: If the Person class contains a reference to a mutable class like Address, how do you ensure the Person class remains immutable? Discuss Deep Copying vs. Shallow Copying.
Section 4: Logic & Data Structures
Debt Records Calculation: Given records of debts (Borrower, Lender, Amount). Borrowing subtracts from a balance, and lending adds to it.
Task: Find the person(s) with the minimum (most negative) balance. If multiple people share the same minimum, return their names in a sorted list.
Round 2: Advanced Coding & Core Java (Harder Complexity)
Question 1: Implement an interface Bank and two classes PersonalLoanDept and BusinessLoanDept based on these requirements:
Interface: Bank with addLoans(int[] loans), averageLoans(), maxLoans(), and minLoans().
Requirements: Constructors must initialize an int[] loans based on a passed capacity (clients or buisnesses).
addLoans: Replace the internal array, ignoring overflow. Print completion messages: "clients processing completed" or "buisnesses processing completed".
averageLoans, maxLoans, minLoans: Perform math and print specific strings (e.g., "Average of loan amount amongst clients {avg}" rounded to 2 decimals vs. "Average of loan amongst buisnesses {avg}").
Goal: Use inheritance correctly to remove redundancy and follow SOLID/DRY principles.
Question 2: https://leetcode.com/problems/valid-parenthesis-string/description/
Hope this helps those preparing for JPMC! Good luck! P.S: Used AI for cleanup.
Questions asked (6)
- 01
HashMap Logic Test
Data Structures & Algorithms
Given a Person class (fields: id, name, salary). If you create three objects: p1(1, "A", 30), p2(2, "B", 60), and p3(1, "A", 30). If you put all three into a HashMap<Person, Integer>, what will map.size() and map.get() return for each? Follow-up: Explain the behavior if hashCode() and equals() are overridden vs. if they are not.
- 02
Custom Sorting of Person Objects
Data Structures & Algorithms
How do you sort a list of Person objects in descending order by name, and if names are equal, in ascending order by salary? Discuss the choice between Comparable and Comparator.
- 03
Creating Immutable Java Classes
Data Structures & Algorithms
How do you make a Java class immutable (mentioning access modifiers, final, etc.)? If the Person class contains a reference to a mutable class like Address, how do you ensure the Person class remains immutable? Discuss Deep Copying vs. Shallow Copying.
- 04
Debt Records Minimum Balance
Data Structures & Algorithms
Given records of debts (Borrower, Lender, Amount). Borrowing subtracts from a balance, and lending adds to it. Task: Find the person(s) with the minimum (most negative) balance. If multiple people share the same minimum, return their names in a sorted list.
- 05
Implement Bank Interface with Loan Departments
Data Structures & Algorithms
Implement an interface Bank and two classes PersonalLoanDept and BusinessLoanDept. Interface Bank has methods addLoans(int[] loans), averageLoans(), maxLoans(), and minLoans(). Constructors must initialize an int[] loans based on a passed capacity (clients or businesses). addLoans replaces the internal array, ignoring overflow, and prints completion messages. averageLoans, maxLoans, minLoans perform calculations and print specific formatted strings. Goal: use inheritance correctly to remove redundancy and follow SOLID/DRY principles.
- 06
Valid Parenthesis String
Data Structures & Algorithms · Medium
Open the problemLeetCode problem: determine if a string containing '(' , ')' and '' characters is valid. '' can be treated as '(', ')' or an empty string.