public Int find(){
Connection conn = null;
int a = 0;
try{
try {
//1 注å驱å¨ç¨åº
Class.forName("oracle.jdbc.driver.OracleDriver");
//2 è¿æ¥æ°æ®åº
conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:ORCL","scott","tiger");
}catch(Exception e) {
System.out.println("没æå¾å°æ°æ®åºè¿æ¥");
e.printStackTrace();
温馨提示:答案为网友推荐,仅供参考