最新回答 / sunyaox
异常: 找不到com.mysql.jdbc.Driver 这个类,这个类在mysql的驱动包里解决: 1. 添加mysql 的jar 包 例如 mysql-connector-java-5.0.8.jar 2. 添加完jar包,要添加到 构建路径 多进行保存代码操作!
2017-04-26
已采纳回答 / sunyaox
Date date = new Date(); //常规创建日期对象;setbirthday(date); 与 setbirthday(new Date()); 实现的结果是一样的。new Date();这种方式叫匿名对象。current_date() 为mysql 内置函数,试试这条查询语句,select current_date() from dual;基础,很总要的
2017-04-25
已采纳回答 / 慕用1749275
params != null&¶ms.size()>0 ; 这段表示里面是否有数据 。 size()比0小的话 说它是个容器举个形象的例子,我有一个空着的水杯(list),而你没有,那你是null,我的size为0。你想装水需要去买个水杯(new ArrayList();),我就可以直接装水(list.add(水))。你要是没有杯子直接倒水,水就流出去啦(空指针异常)。所以用做判断的时候经常连用 list!=null && list.size()!=0 。
2017-04-21
最新回答 / 慕粉0025237955
@慕粉3380558 ,你這個也不對啊,Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?,?,?,?,?,?,?,...
2017-04-19
最新回答 / soft_xiao
jdbc:mysql://ip:3306/girls?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true
2017-04-17