





































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






































public class BankAccount { private double balance; public double getBalance () { return balance; } public void setBalance (double b) { balance = b; } : }
public static void main(String args[]) { BankAccount myacc = new BankAccount(); double bal = myacc.getBalance(); bal = bal * 1.15; // calculate interest myacc.setBalance(bal); }