Capgemini interview question

Basic Java concepts HR logical questions