Private is a access specifier. It means that anything say a instance private declared private cannot be accessed by methods of another class.
What is the point of being private if it can be changed by public methods.
Maybe it is because either because my book's poor explanation or my understanding problem that I just don't get what private is.
The book says that being private is a process of hiding the data and providing methods for data access. (Encapsulation)
Also, here is a example where a error would occur. But I have no idea what is it:
public class BankRobber
{
BandAccount momSavings =
new BankAccount (1000);
...
momSaving.balance = -1000;
}}
A