Wipro interview question

mosyly on java 8