Mphasis interview question

related to java 8 question