Infosys interview question

Java , java 8, spring