estou a fazer o getConnection();
public static Connection getConnection() throws SQLException{
try{
Class.forName("com.mysql.jdbc.Driver");
return
DriverManager.getConnection("jdbc:mysql://localhost:3306/bibliotecamultimedia?user=root&password=others");
}catch(ClassNotFoundException e){
e.printStackTrace();
}
return null;
}
Mas está a dar erro em:
return
DriverManager.getConnection("jdbc:mysql://localhost:3306/bibliotecamultimedia?user=root&password=others");
o erro é: incompatible types.
Alguém me consegue ajudar?
Obrigado a todos, abraço.