Infosys interview question

all questions based on Java