Capgemini interview question

Basic Java quesions