共 3 篇文章 |
|
oracle数据库:jdbc通用sql分页封装 /** * 查询结果的总数,常用的地方就是查询分页时的总记录数 * @param sql:原始sql语句! 阅474 转7 评0 公众公开 15-05-14 11:19 |
public class Demo { public static void main(String[] args) { String url = "jdbc:mysql://localhost:3306/person";需要注意的是,执行插入的SQL语句比较难写,最好是打印出SQL语句用以检查。public class Demo { public static void main(String[] args) { if (args.length ! 阅47 转0 评0 公众公开 14-08-12 18:39 |
阅430 转0 评0 公众公开 14-08-12 13:33 |
为了启动MyThread,需要首先实例化一个Thread,并传入自己的MyThread实例:MyThread myThread = new MyThread();Thread thread = new Thread(myThread);thread.start();事实上,当传入一个Runnable target参数给Thread后,Thread的run()方法就会调用target.run(),参考JDK源代码:public void run() { if (target != null) { target.run... 阅44 转0 评0 公众公开 14-07-21 15:56 |