流程图,输入值没有或者错误是可进行提醒并重复输入
package com.tzh.yinhang;
import util.jdbc;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class hao1 {
//转账姓名
public static String zqxm;
//收钱卡号
public static int sqkh;
//多少钱
public static int dsq;
//转钱的原来有多少钱
public static int zqyl;
//收钱的原来有多少钱
public static int sqyl;
Scanner input=new Scanner(System.in);
public boolean f1(String a){
zqxm=a;
Connection con= jdbc.getcon();
PreparedStatement prep=null;
ResultSet resu=null;
try {
prep=con.prepareStatement("select * from yonghushuju where xming=?;");
prep.setString(1, a);
resu=prep.executeQuery();
if(resu.next()){
//有这个人查询其密码,卡号,余额
List alist=f3(a);
yonghushuju yh=(yonghushuju)alist.get(0);
int cardhao=yh.getCardhao();
int miam=yh.getMima();
int ye=yh.getYe();
zqyl=ye;
return f4(cardhao,miam,ye);
}else{
System.out.println("没有这个人");
return false;
}
} catch (Exception e) {
e.printStackTrace();
}finally {
jdbc