Cognizant Interview Question

Write a java code to explain encapsulation .