You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
498 B
11 lines
498 B
public class BankAccountTest {
|
|
public static void main(String[] args) {
|
|
BankAccount account = new BankAccount("6222021234567890123", "张三");
|
|
account.deposit(1000);
|
|
account.withdraw(300);
|
|
System.out.println("户主姓名:" + account.getOwnerName());
|
|
System.out.println("当前余额:" + account.getBalance());
|
|
account.setOwnerName("李四");
|
|
System.out.println("修改后户主姓名:" + account.getOwnerName());
|
|
}
|
|
}
|