Cognizant interview question

Core java, Spring