银行业

Java_银行新用户业务办理代码

送分小仙女□ 提交于 2019-11-25 22:25:07
import java . util . Scanner ; class Bank { Scanner scan = new Scanner ( System . in ) ; //创建Scanner对象; //定义欢迎语句; static String string1 = "--------------欢迎来到招商银行--------------" ; //定义sum变量用于存储账户余额; private double sum = 0 ; int flag = 1 ; //作用是退出操作; private String name = null ; //定义构造方法用于开户; public Bank ( double sum ) { this . sum = sum ; System . out . println ( "请先输入开户的信息" ) ; System . out . print ( "请输入你的姓名:" ) ; name = scan . nextLine ( ) ; //获取用户输入的姓名; System . out . print ( "输入你的账号:" ) ; String str01 = scan . nextLine ( ) ; //获取输入的账号; System . out . print ( "请输入你的密码:" ) ; String str02 =