J.P. Morgan Interview Question

Java core ,spring