Capgemini Engineering Interview Question

Basic oops concepts in java