添加图书的java源代码 用java添加图书信息的代码

java web图书管理系统添加图书返回一直是操作失败!求解 , 楼下附源码!stmt.executeQuery(s)中间不要添加参数
修改一下 stmt.executeQuery()
用JAVA做一个图书馆管理系统,不需要用到数据库package com.efounder.formbuilder.dat;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import com.efounder.formbuilder.fmt.FmtCol;
/**
* pTitle: /p
* pDescription: /p
* pCopyright: Copyright (c) 2005/p
* pCompany: /p
* @author not attributable
* @version 1.0
*/
public class DataRow extends DataAxis {
protected java.util.Map dataCellList = null;
/**
*
* @return Map
*/
public Map getDataCellList() {
return dataCellList;
}
/**
*
* @param map Map
*/
public void setDataCellList(Map map) {
dataCellList = map;
}
/**
* 数据行上存在的是多个维度,每个维度对应的是一个数据字典
*/
public DataRow() {
}
/**
*
* @param key Object
* @param dataCell DataCell
*/
public void putDataCell(Object key,DataCell dataCell) {
if ( dataCellList == null ) dataCellList = new java.util.HashMap();
dataCellList.put(key,dataCell);
}
/**
*
* @param key Object
* @return DataCell
*/
public DataCell getDataCell(Object key) {
DataCell datacell = null;
【添加图书的java源代码 用java添加图书信息的代码】if ( dataCellList != null ){
datacell = (DataCell)dataCellList.get(key);
if(datacell == null)
datacell = getDataCellIterator(key);
}
return datacell;
}
/**
* FmtCol FLEX对象以FmtCol对象名称为key 需要遍历取出对应的DataCell add by wujf at 20120220
* @param key Object
* @return DataCell
*/
public DataCell getDataCellIterator(Object key) {
if ( dataCellList != null ){
Iterator entrySetIterator=dataCellList.entrySet().iterator();
while(entrySetIterator.hasNext()){
Entry entry= (Entry)entrySetIterator.next();
if(entry.getKey() instanceof FmtCol) break;
//if(((String)entry.getKey()).startsWith("com.efounder.formbuilder.fmt.FmtCol")) {
DataCell datacell = (DataCell)entry.getValue();
if(datacell.getDataCol() == key){
return datacell;
}
}
}
return null;
}
}
Java web 程序设计: 在数据库中建立一个表:T_BOOK,包含图书ID、图书名称、图书价格 。涉及到页面不刷新技术,这是在考察AJAX,在页面写入AJAX , 利用AJAX进行访问action , 调用action里的方法,要在页面写好JS
java图书管理界面系统的源代码java swing 登陆界面code
/*
* Login.java
*
* Created on __DATE__, __TIME__
*/
package com.agen.library.window;
import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import com.agen.library.factory.DAOFactory;
import com.agen.library.util.GlobalUser;
import com.agen.library.vo.User;
/**
*
* @author __USER__
*/
public class Login extends javax.swing.JFrame {
/**
*
*/
private static final long serialVersionUID = -2176093732040600809L;
/** Creates new form Login */
public Login() {
super("易云图书管理软件V1.0");
Image ime = Toolkit.getDefaultToolkit().getImage(
getClass().getResource("/images/ico.png"));
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UnsupportedLookAndFeelException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
setIconImage(ime);
initComponents();
setLocationRelativeTo(null);
this.setResizable(false);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
// GEN-BEGIN:initComponents
// editor-fold defaultstate="collapsed" desc="Generated Code"
private void initComponents() {
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jPasswordField1 = new javax.swing.JPasswordField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
jMenuItem2 = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
formKeyPressed(evt);
}
public void keyTyped(java.awt.event.KeyEvent evt) {
formKeyTyped(evt);
}
});
jLabel2.setFont(new java.awt.Font("微软雅黑", 0, 14));
jLabel2.setText("用户名:");
jLabel3.setFont(new java.awt.Font("微软雅黑", 0, 14));
jLabel3.setText("密码:");
jTextField1.setFont(new java.awt.Font("微软雅黑", 0, 14));
jTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});
jPasswordField1.setFont(new java.awt.Font("微软雅黑", 0, 12));
jPasswordField1.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
jPasswordField1KeyTyped(evt);
}
});
jButton1.setBackground(new java.awt.Color(223, 216, 216));
jButton1.setFont(new java.awt.Font("微软雅黑", 0, 14));
jButton1.setText("登陆");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setBackground(new java.awt.Color(223, 216, 216));
jButton2.setFont(new java.awt.Font("微软雅黑", 0, 14));
jButton2.setText("取消");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jLabel1.setIcon(new javax.swing.ImageIcon(
getClass().getResource("/images/login_main.jpg"))); // NOI18N
jMenu1.setText("File");
jMenu1.setFont(new java.awt.Font("微软雅黑", 0, 14));
jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_Q,
java.awt.event.InputEvent.CTRL_MASK));
jMenuItem1.setText("Exit");
jMenuItem1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenuItem1MouseClicked(evt);
}
});
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem1);
jMenuBar1.add(jMenu1);
jMenu2.setText("Help");
jMenu2.setFont(new java.awt.Font("微软雅黑", 0, 14));
jMenuItem2.setText("About");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem2);
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(layout
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addGroup(
layout.createSequentialGroup()
.addContainerGap()
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.TRAILING,
false)
.addComponent(
jLabel2,
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
javax.swing.GroupLayout.Alignment.LEADING,
layout.createSequentialGroup()
.addComponent(
jLabel3)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
layout.createSequentialGroup()
.addGap(10,
10,
10)
.addComponent(
jButton1)
.addGap(47,
47,
47)
.addComponent(
jButton2))
.addComponent(
jPasswordField1)
.addComponent(
jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE,
197,
Short.MAX_VALUE))
.addContainerGap()))));
layout.setVerticalGroup(layout
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(
jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE,
24,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(
jPasswordField1,
javax.swing.GroupLayout.PREFERRED_SIZE,
23,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2))
.addContainerGap(
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)));
pack();
}// /editor-fold
// GEN-END:initComponents
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
About.start();
}
private void jPasswordField1KeyTyped(java.awt.event.KeyEvent evt) {
if (evt.getKeyChar() == '\n') {
String name = jTextField1.getText(); // 获取用户名
String pass = String.valueOf(jPasswordField1.getPassword());// 获取密码
User user = null;
// 未输入用户名
if (name.equals("") || name == null) {
JOptionPane.showMessageDialog(this, "用户名不允许为空!", "cuowu", 0);
return;
}
try {
user = DAOFactory.getIUserDAOInstance().findById(name);
if (user != null) {
if (user.getPass() != nulluser.getPass().equals(pass)) {
GlobalUser.LOGIN_USER = user; // 记录当前用户
// 进入主界面
Main.start();
this.dispose();
} else {
JOptionPane.showMessageDialog(this, "用户名或密码错误!");
return;
}
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (user == null) {
JOptionPane.showMessageDialog(this, "用户名或密码错误!", "消息", 0);
return;
}
}
}
private void formKeyTyped(java.awt.event.KeyEvent evt) {
}
private void formKeyPressed(java.awt.event.KeyEvent evt) {
}
private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
jTextField1.setText("");
jPasswordField1.setText("");
jTextField1.requestFocus();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String name = jTextField1.getText(); // 获取用户名
String pass = String.valueOf(jPasswordField1.getPassword());// 获取密码
User user = null;
// 未输入用户名
if (name.equals("")) {
JOptionPane.showMessageDialog(this, "用户名不允许为空!");
return;
}
try {
user = DAOFactory.getIUserDAOInstance().findById(name);
if (user != null) {
if (user.getPass() != nulluser.getPass().equals(pass)) {
GlobalUser.LOGIN_USER = user; // 记录当前用户
// 进入主界面
Main.start();
this.dispose();
} else {
JOptionPane.showMessageDialog(this, "用户名或密码错误!", "消息", 0);
return;
}
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (user == null) {
JOptionPane.showMessageDialog(this, "用户名或密码错误!", "消息", 0);
return;
}
}
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
if (JOptionPane.showConfirmDialog(this, "你确定要退出吗?", "提示",
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
System.exit(0);
}
}
private void jMenuItem1MouseClicked(java.awt.event.MouseEvent evt) {
System.exit(1);
}
/**
* @param args
*the command line arguments
*/
public static void main(String args[]) {
//System.out.println(Login.class.getResource("src/images/images/login_main.jpg"));
//new javax.swing.ImageIcon(
//Login.class.getResource("../../../../images/login_main.jpg"));
//new Login().setVisible(true);
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Login().setVisible(true);
}
});
}
// GEN-BEGIN:variables
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem2;
private javax.swing.JPasswordField jPasswordField1;
private javax.swing.JTextField jTextField1;
// End of variables declaration//GEN-END:variables
}
求一个Java或者C#MySQL数据库写的图书管理系统程序#include iostream
#include iomanip
#include string
#include fstream//输入/输出文件流类
using namespace std;
const int Maxr=100;//最多的读者
const int Maxb=100;//最多的图书
const int Maxbor=5;//每位读者最多借五本书
//读者类,实现对读者的信息的描述
class Reader
{
private:
int tag; //删除标记 1:已删 0:未删
int no; //读者编号
char name[10]; //读者姓名
int borbook[Maxbor];//所借图书
public:
Reader() {}
char *getname() {return name;} //获取姓名
int gettag() {return tag;} //获取删除标记
int getno() {return no;} //获取读者编号
void setname(char na[]) //设置姓名
{
strcpy(name,na);
}
void delbook(){ tag=1; }//设置删除标记 1:已删 0:未删
void addreader(int n,char *na)//增加读者
{
tag=0;
no=n;
strcpy(name,na);
for(int i=0;iMaxbor;i)
borbook[i]=0;
}
void borrowbook(int bookid)//借书操作
{
for(int i=0;iMaxbor;i)
{
if (borbook[i]==0)
{
borbook[i]=bookid;
return;
}
}
}
int retbook(int bookid)//还书操作
{
for(int i=0;iMaxbor;i)
{
if(borbook[i]==bookid)
{
borbook[i]=0;
return 1;
}
}
return 0;
}
void disp()//读出读者信息
{
coutsetw(5)no setw(10)name"借书编号:[";
for(int i=0;iMaxbor;i)
if(borbook[i]!=0)
coutborbook[i]"|";
cout"]"endl;
}
};
//读者类库,实现建立读者的个人资料
class RDatabase
{
private:
int top; //读者记录指针
Reader read[Maxr];//读者记录
public:
RDatabase() //构造函数 , 将reader.txt读到read[]中
{
Reader s;
top=-1;
fstream file("reader.txt",ios::in);//打开一个输入文件
while (1)
{
file.read((char *)s,sizeof(s));
if (!file)break;
top;
read[top]=s;
}
file.close(); //关闭 reader.txt
}
void clear()//删除所有读者信息
{
top=-1;
}
int addreader(int n,char *na)//添加读者时先查找是否存在
{
Reader *p=query(n);
if (p==NULL)
{
top;
read[top].addreader(n,na);
return 1;
}
return 0;
}
Reader *query(int readerid)//按编号查找
{
for (int i=0;i=top;i)
if (read[i].getno()==readerid
read[i].gettag()==0)
{
return read[i];
}
return NULL;
}
void disp() //输出所有读者信息
{
for (int i=0;i=top;i)
read[i].disp();
}
void readerdata();//读者库维护
~RDatabase() //析构函数,将read[]写到reader.txt文件中
{
fstream file("reader.txt",ios::out);
for (int i=0;i=top;i)
if (read[i].gettag()==0)
file.write((char *)read[i],sizeof(read[i]));
file.close();
}
};
void RDatabase::readerdata()
{
char choice;
char rname[20];
int readerid;
Reader *r;
while (choice!='0')
{
cout "\n\n\t\t\t读 者 维 护\n\n\n\t\t 1 新 增\n\n\t\t 2 更 改\n\n\t\t 3 删 除\n\n\t\t 4 查 找\n\n\t\t 5 显 示\n\n\t\t 6 全 删\n\n\t\t 0 退 出"endl;
cinchoice;
switch (choice)
{
case '1':
cout"输入读者编号:";
cinreaderid;
cout"输入读者姓名:";
cinrname;
addreader (readerid,rname);
break;
case '2':
cout"输入读者编号:";
cinreaderid;
r=query(readerid);
if (r==NULL)
{
cout" 该读者不存在 "endl;
break;
}
cout"输入新的姓名:";
cinrname;
r-setname(rname);
break;
case '3':
cout" 输入读者编号:";
cinreaderid;
r=query(readerid);
if (r==NULL)
{
cout " 该读者不存在"endl;
break;
}
r-delbook();
break;
case '4':
cout"读入读者编号:";
cinreaderid;
r=query(readerid);
if (r==NULL)
{
cout "该读者不存在" endl;
break;
}
r-disp();
break;
case '5':
disp();
break;
case '6':
clear();
break;
default:cout"输入错误,请从新输入:";break;
}
}
}
//图书类,实现对图书的描述 , 图书的编号,书名,借出 , 还入等
class Book
{
private:
int tag;//删除标记 1:已删 0:未删
int no;//图书编号
char name[20];//书名
int onshelf;//是否再架 1:再架 2:已借
public:
Book(){}
char *getname() { return name; }//获取姓名
int getno(){ return no; }//获取图书编号
int gettag(){ return tag; }//获取删除标记
void setname(char na[])//设置书名
{
strcpy(name,na);
}
void delbook(){ tag=1;}//删除图书
void addbook(int n,char *na)//增加图书
{
tag=0;
no=n;
strcpy(name,na);
onshelf=1;
}
int borrowbook()//借书操作
{
if (onshelf==1)
{
onshelf=0;
return 1;
}
return 0;
}
void retbook()//还书操作
{
onshelf=1;
}
void disp()//输出图书
{
coutsetw(6)nosetw(18)namesetw(10)
(onshelf==1? "在架":"已借") endl;
}
};
//图书库类,实现对图书的维护,查找 , 删除等
class BDatabase
{
private:
int top; //图书记录指针
Book book[Maxb]; //图书记录
public:
BDatabase()//构造函数,将book.txt读到book[]中
{
Book b;
top=-1;
fstream file("book.txt",ios::in);
while (1)
{
file.read((char *)b,sizeof(b));
if (!file) break;
top;
book[top]=b;
}
file.close();
}
void clear()//全删
{
top=-1;
}
int addbook(int n,char *na)//增加图书
{
Book *p=query(n);
if (NULL==p)
{
top;
book[top].addbook(n,na);
return 1;
}
return 0;
}
Book *query(int bookid)//查找图书
{
for (int i=0;i=top;i)
if (book[i].getno()==bookid book[i].gettag()==0)
{
return book[i];
}
return NULL;
}
void bookdata();//图书库维护
void disp()
{
for (int i=0;i=top;i)
if (book[i].gettag()==0)
book[i].disp();
}
~BDatabase()//析构函数,将book[]写到book.txt文件中
{
fstream file("book.txt",ios::out);
for (int i=0;i=top;i)
if (book[i].gettag()==0)
file.write((char *)book[i],sizeof(book[i]));
file.close();
}
};
void BDatabase::bookdata()
{
char choice;
char bname[40];
int bookid;
Book *b;
while (choice!='0')
{
cout "\n\n\n\t\t\t图 书 维 护 "endlendl;
cout"\t\t1 新 增\n \t\t2 更 改\n\t\t3 删 除\n\t\t4 查 找\n\t\t5 显 示\n\t\t6 全 删\n\t\t0 退 出"endl;
cinchoice;
switch (choice)
{
case '1':
cout"输入图书编号:"endl;
cinbookid;
cout"输入图书书名:"endl;
cinbname;
addbook(bookid,bname);
break;
case '2':
cout"输入图书编号:"endl;
cinbookid;
b=query(bookid);
if (b==NULL)
{
cout" 该图书不存在 "endl;
break;
}
cout"输入新的书名:"endl;
cinbname;
b-setname(bname);
break;
case '3':
cout " 读入图书编号:"endl;
cinbookid;
b=query(bookid);
if (b==NULL)
{
cout " 该图书不存在"endl;
break;
}
b-delbook();
break;
case '4':
cout" 读入图书编号:"endl;
cinbookid;
b=query(bookid);
if (b==NULL)
{
cout " 该图书不存在" endl;
break;
}
b-disp();
break;
case '5':
disp();
break;
case '6':
clear();
break;
default:cout"输入错误,请从新输入:";
}
}
}
//main() 函数的实现 , 程序的主界面的引导
void main()
{
char choice;
int bookid,readerid;
RDatabase ReaderDB;
Reader *r;
BDatabase BookDB;
Book *b;
while(choice!='0')
{
cout endlendl"\t\t\t 图 书 管 理 系 统\n\n\n";
cout "\t\t\t1 借 书\n\n\t\t\t2 还 书 \n\n\t\t\t3 图 书 维 护\n\n\t\t\t4 读 者 维 护\n\n\t\t\t0 离 开"endl;
cinchoice;
switch (choice)
{
case '1':
cout " 借书 读者编号:";
cin readerid;
cout " 图书编号: ";
cin bookid;
r=ReaderDB.query(readerid);//按编号查找
if (NULL==r)
{
cout " 不存在该读者,不能借书" endl;
break;
}
b=BookDB.query(bookid);
if (b==NULL)
{
cout " 不存在该图书,不能借书" endl;
break;
}
if (b-borrowbook()==0)
{
cout" 该图书已借出,不能借书" endl;
break;
}
r-borrowbook(b-getno());
break;
case '2':
cout"还书\n 读者编号:";
cin readerid;
cout" 图书编号:";
cin bookid;
r=ReaderDB.query(readerid);
if (r==NULL)
{
cout " 不存在该读者,不能还书"endl;
break;
}
b=BookDB.query(bookid);
if (b==NULL)
{
cout " 不存在该图书,不能还书" endl;
break;
}
b-retbook();
r-retbook(b-getno());
break;
case '3':
BookDB.bookdata();
break;
case '4':
ReaderDB.readerdata();
break;
default:cout"输入错误 , 请从新输入:";
}
}
}
java中如何写一个可以任意在下面的集合中添加图书删除图书的方法由于ArrayList是按照保存的顺序排序的 所以删除就是删除最后一个
代码如下:
private final static String[] chineseNumber = {"一", "二", "三", "四", "五", "六", "七", "八", "九", "十"};
private final static String[] chineseBits = {"十", "百", "千", "万"};
public static addBook(String bookName, int cost, String id, String date) {
books.add(new Book("第"toChineseNumber(books.length)"本书", "第"toChineseNumber(books.length)"号出版社" ), cost, id, date);
}
public static deleteBook() {
books.remove(books.length - 1);
}
private static toChineseNumber(int source) {
StringBuilder sb = new StringBuilder();
for (int i = 0; isource.length(); i) {
int n = Integer.valueOf(source.charAt(i));
String chinese = chineseNumber[n];
String bits = chineseBits[source.length() - i - 1];
if(0 == n) {
sb.append(chinese);
} else {
sb.append(chinesebits);
}
}
}
关于添加图书的java源代码和用java添加图书信息的代码的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

    推荐阅读