Synechron Interview Question

mostly on java 8