So I have a question on \"setter\" and \"getter\" methods and how useful they are or aren\'t.
Let\'s say I just write a very basic program like the following:
<
The java keyword "private" in front of each of the Account class’s field declarations, prevents direct reference to that field. If you put myAccount.name = “whatever” in the UseAccount class, you get the error message: "name has private access in Account". Instead of referencing myAccount.name, the UseAccount programmer need to call method myAccount.setName or method myAccount.getName. These methods are called accessor methods, because they provide access to the Account class’s fields.