I have studied data hiding in java theoretically but don't know what is happening inside. Every tutorial, states that unauthorized persons cant access the data of others.
Can anyone please give an example of what will happen without and with data hiding with two or three users programmatically?
Data Hiding is hiding internal data from outside users. This is achieved by making the attributes of your class private and not letting the objects of the class access it directly, instead we create getters and setters to access the private attributes. Example:
//Without Data Hiding
//With Data Hiding