最新回答 / 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