package yourPackage;
import java.sql.*;
public class connection {
/** Creates a new instance of connection */
public connection() {
}
public static Connection getConnection(){
Connection connect =null;
try{
//load the driver
Class.forName("oracle.jdbc.driver.OracleDriver");
connect = DriverManager.getConnection("jdbc

racle:thin:@loc alhost:1521:xe","system","manager");
}
catch(ClassNotFoundException cnfe){
cnfe.printStackTrace();
}
catch(SQLException sqle){
sqle.printStackTrace();
}
return connect;
}
}