1: //BankAccount.java 2: 3: /** 4: * This class is used in the program LocalVariablesDemoProgram. 5: */ 6: public class BankAccount 7: { 8: public double amount; 9: public double rate; 10: 11: public void showNewBalance() 12: { 13: double newAmount = amount + (rate / 100.0) * amount; 14: System.out.println("With interest added, the new amount is $" 15: + newAmount); 16: } 17: }