Tech Mahindra Interview Question

They asked me the oops concepts in java