J.P. Morgan interview question

Java 8/11 questions, Spring boot.