Cognizant Interview Question

oops, java8, 1 coding question