.*;.*;lassT{publicstaticvoidmain(String[]args)throwsException{Connectionconn=null;Statementstmt=null;ResultSetrs=null;while(true){Scannerscanner=newScanner();"请输入用户名:");Stringusername2=();"请输入密码:");Stringpassword2=();if(!(("")||(""))){try{("");conn=("jdbc:odbc:book","","");Stringsql="select*from='"+username2+"'";stmt=();rs=(sql);if(()){if(("password").equals(password2)){"*********欢迎来山东科技大学图书馆管理系统********");while(true){"");"");"");"");"");"");//"");"请输入选择功能的序号:");inta=();switch(a){ case1: "图书信息:"); ":"); ":"); ":"); ":"); inta1=();switch(a1){ case1: "欢迎进入图书信息查询系统:"); ":"); ":"); intd=();switch(d){ case1: intllll=0;//intmm=0;while(llll!=1){ ":"); StringSql0="SELECT*FROMsystembook"; rs=(Sql0); while(()){StringbookID=(1);StringbookNo=(2);StringbookName=(3);StringbookWriter=(4);StringbookPub=(5);","+bookNo+","+bookName+","+bookWriter+","+bookPub);}"是否继续插入?yes/nono返回主菜单"); Stringk=(); if(("yes")) { ;}; if(("no")) { llll=1; ; }; }break;//break;case2:":");":");":");":");":");"");intc12=();switch(c12){ case1: ":"); ":"); intddd=0; while(ddd!=1){ "请输入图书编码号:"); StringA=(); Stringsql1="SELECT*FROMsystembookWHEREbookID='"+A+"'"; rs=(sql1); intx=0; while(()){ Stringa2=(1); Stringb2=(2); Stringc2=(3); Stringd2=(4);Stringe2=(5);","+b2+","+c2+","+d2+","+e2);x++;}if(x==0){"查无此书,请重新输入");}else{"是否继续按姓名查询?yes/nono返回主菜
用java做的一个图书管理系统的源代码 来自淘豆网m.daumloan.com转载请标明出处.