usebankaccount.java

来自「Java 入门书的源码」· Java 代码 · 共 20 行

JAVA
20
字号
//Copyright (c) 1998, Arthur Gittleman
//This example is provided WITHOUT ANY WARRANTY either expressed or implied.

/*  Put the main method from Example 2.9 in a
 *  UseBankAccount class in the file UseBankAcount.java.
 */

public class UseBankAccount {
  public static void main (String [ ] args) {
  BankAccount anotherAccount = new BankAccount();             
  anotherAccount.deposit(5203);
  System.out.println
    ("My balance = " + anotherAccount.getBalance());
  anotherAccount.deposit(99099);                                                          
  System.out.println
    ("My balance = " + anotherAccount.getBalance());
  }
}

          

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?