Cognizant interview question

Write a java code to explain encapsulation .