fiz uma aplicação teste e utilizei um servidor mysql em local host, com o wampserver, agora criei uma conta para testes no site db4free, mas não encontrei nenhum tutorial na internet de como fazer isso, sou iniciante mas entendo rapido as coisas. alguém pode me indicar alguma video aula que ensine ou consiga me mostrar como devo fazer isso ?
privatestaticfinalStringDRIVER="com.mysql.jdbc.Driver";privatestaticfinalStringURL="jdbc:mysql://db4free.net:3306/texian";privatestaticfinalStringUSER="meubanco";privatestaticfinalStringPASS="minha senha";publicstaticConnectiongetConnection(){try{Class.forName(DRIVER);//AQUI ESTÁ DIFERENTE DA VIDEO AULAreturn(Connection)DriverManager.getConnection(URL,USER,PASS);}catch(ClassNotFoundException|SQLExceptionex){thrownewRuntimeException("Erro na conexão:",ex);}}publicstaticvoidcloseConnetion(Connectioncon){try{if(con!=null){con.close();}}catch(SQLExceptionex){Logger.getLogger(ConnectionFactory.class.getName()).log(Level.SEVERE,null,ex);}}publicstaticvoidcloseConnetion(Connectioncon,PreparedStatementstmt){closeConnetion(con);try{if(stmt!=null){stmt.close();}}catch(SQLExceptionex){Logger.getLogger(ConnectionFactory.class.getName()).log(Level.SEVERE,null,ex);}}publicstaticvoidcloseConnetion(Connectioncon,PreparedStatementstmt,ResultSetrs){closeConnetion(con,stmt);try{if(rs!=null){rs.close();}}catch(SQLExceptionex){Logger.getLogger(ConnectionFactory.class.getName()).log(Level.SEVERE,null,ex);}}publicstaticvoidcloseConnection(java.sql.Connectioncon,PreparedStatementstmt,ResultSetrs){thrownewUnsupportedOperationException("Not supported yet.");//To change body of generated methods, choose Tools | Templates.}