Capgemini interview question

Java OOPS concepts