Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Account {
- private int balance;
- public Account() {
- this.balance = 0;
- }
- public void transfer(int amount) {
- this.balance += amount;
- }
- @Override
- public String toString() {
- return "Account (balance: " + balance + ")";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement