J.P. Morgan Interview Question

Java 8/11 questions, Spring boot.