DXC Technology Interview Question

Encapsulation in java