参考:
1)使用循环语句保存,如:
for(int i=0;i<peoples.lenth;i++)
String values = String[i];
2)显示类似

解决方案 »

  1.   

    Statement stm=connect.createStatement();
    for(int i=0;i<peoples.lenth;i++){
      String sql="insert into table1 d='"+peoles[i]+"'";
      stm.addBatch(sql);
    }
    stm.executeBatch();
      

  2.   

    Connection     DBCon = null;
    PreparedStatement ps = null;
    ResultSet         rs = null;
    sql = new StringBuffer();//insert
    for (){
        sql = "insert into table1(...) values(..." + peoples[i] + "...)";//...代表字段名或者字段的值
        ps = DBCon.prepareStatement(sql.toString());
        ps.execute();//or ps.executeQuery(), 我忘了^_^
    }//select
    sql = "select .. from table1";//...代表字段名或者字段的值
    ps = DBCon.prepareStatement(sql.toString());
    rs = ps.executeQuery();while (rs.next())
    {
        peoples[i] = rs.get(..);
    }
    //完善一下就应该ok了,不帮你写完整了。^_^