Question OOP-ENC-0034
EasyA BankAccount class exposes deposit() and withdraw() but keeps balance private. What does this mainly protect against?
- A.
Code outside the class setting the balance to any value it likes
- B.
Compilation errors
- C.
Sign up free to see the answer and a step-by-step explanation.