Capgemini interview question

Simple java basics