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

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) {

 }

}

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

你可能感兴趣的:(Eclipse第五讲:Eclipse高级操作(1)常用技巧)