Infosys interview question

Basic Core Java question, Spring and Hibernate