Most of you heard the word 'Encapsulation' while dealing with Java OOPs concepts. What it stands for? We will start with an example. Imagine you have made your class with public instance variables as shown below. public class Sample{ public int height; public int weight; } public class MainClass{ public static void main(String args[]){ Sample sample = new Sample(); sample.height = 170; } You have created this class and think that many of others used this class for setting height and weight variables directly. Now you are really in trouble. Just think a situation that you want to do something when someone set height variable?. Can you do that without breaking everyone's code? Here comes encapsulation. It helps to change your implemented code without breaking the code of others who use your code. You must follow encapsulation if you want maintainability , flex...