?? teststudentstore.java
字號:
/**
* 這是StudentStore類、DBConnection類、QueryTableStore類的測試程序
*/
import java.sql.Connection;
import java.util.HashMap;
public class TestStudentStore
{
public static void main(String[] args)
{
DBConnection dbCon = new DBConnection();
Connection con = dbCon.getConnection();
QueryTableStore query = new QueryTableStore();
HashMap map = query.getStudent(con);
StudentStore store = (StudentStore)map.get("student");
System.out.println("當前StudentStore中元素的個數為=" + store.size());
for(int i = 0; i < store.size(); i++)
{
String name = store.getStudentName(i);
String number = store.getStudentNumber(i);
String sex = store.getStudentSex(i);
String spec = store.getStudentSpeciality(i);
System.out.println("姓名=" + name + "\t學號=" + number +
"\t性別=" + sex + "\t專業=" + spec);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -