Eclipse第五讲:Eclipse高级操作(1)常用技巧

1.
(1)代码自动完成功能:Alt+/
(2)代码格式化功能:Ctrl+shift+F
(3)jar包关联源代码
(4)打开类型,查看父类实现,查看类型层次结构,查看方法调用
2.代码搜索

原代码如下:
ckage com.comnew.demo;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class JDBCDrive {

 public void testDB() throws ClassNotFoundException,SQLException{
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  Connection cn=null;
  PreparedStatement stmt=null;
  try
  {
   cn=DriverManaget.getConnection("jdbc:odbc:MQIS");
   stmt=cn.prepareStatement("update T_T1 set FAge=20");
   stmt.execute();
   cn.clearWarnings();
   StringBuffer sb=null;
  }
  catch(SQLException e)
  {
   throw e;
  }
  finally
  {
   if(stmt!=null)
   {
    stmt.close();
   }
   if(cn!=null)
   {
    cn.close();
   }
  }
 }
 public static void main(String[] args) {

 }

}

糟糕,明天要交毕业设计初稿,这个先放一边....

posted on 2007-04-25 12:10 糖果 阅读(631) 评论(0)  编辑  收藏 所属分类: 毕业设计


只有注册用户登录后才能发表评论。


网站导航:
 
<2007年4月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

导航

统计

公告

毕业设计~~加油~~

常用链接

留言簿(11)

随笔分类

随笔档案

战友^-^

搜索

最新评论

阅读排行榜

评论排行榜