public Connection getCon() throws ClassNotFoundException, SQLException { url = "jdbc:oracle:thin:@localhost:1521:orcl"; user = "scott"; password = "tiger"; //第一步,加载驱动程序 Class.forName("oracle.jdbc.driver.OracleDriver"); //第二步,获得数据库连接对象 con = DriverManager.getConnection(url,user,pa