GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

i dont know why iam getting exception even after implementing exceptions and setting the oracle 11g jar class path in eclipse please help me.

package advjava.com.odbc;
import java.sql.*;

public class OdbcFirst {

    public static void main(String[] args) throws ClassNotFoundException, SQLException  {
        
        
        Class.forName("oracle.jdbc.driver.oracleDriver");
        Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","prasanna");
        String str="create table emp222(eid number,ename varchar2(20),esal number)";
        Statement st=con.createStatement();
        st.executeUpdate(str);
        con.close();
        }
        
    }

}

asked Dec 15, 2016 by prasanna kumar
...