JPMorganChase interview question

a few program using java8