Cognizant interview question

oops, java8, 1 coding question