Infosys Interview Question

what is the difference between encapsulation and inheritance?