import com.mysql.jdbc.Driver;一句中com的意思?是通用对象模型吗?DriverManager创建的对象有没有像PHP里面的
bindValue()
bind_result()
bind_param()
之类的绑定的方法?

解决方案 »

  1.   

    com是包名的一部分!
    com.mysql.jdbc是包名
      

  2.   

    我的意思是为什么叫这个名字,为什么不是xyz.mysql.jdbc
      

  3.   

    PreparedStatement statement = connection.prepareStatement("INSERT INTO TABLEX VALUES(?, ?)");
    //记录1
    statement.setInt(1, 1);
    statement.setString(2, "Cujo");
    statement.addBatch();
    //记录2
    statement.setInt(1, 2);
    statement.setString(2, "Fred");
    statement.addBatch();
    //记录3
    statement.setInt(1, 3);
    statement.setString(2, "Mark");
    statement.addBatch();
    //批量执行上面3条语句.
    int [] counts = statement.executeBatch();
    //Commit it  到(DB)里面
      

  4.   

    一般包得命名规则是用
    com.公司名.xxx
    org.组织名.xxx
    当然你也可以随便写。