New to JDBC and trying to connect to data base in MySql workbench. Following is the Java code
import java.sql.*;
public class Demo {
public static void main(String[] args) throws Exception
{
String url = "jdbc:mysql://localhost:3306//students?useSSL=false";
String user = "root";
String password = "root";
String query = "Select * from students";
Class.forName("com.mysql.cj.jdbc.Driver");
Connection con = DriverManager.getConnection(url, user, password);
Statement st = con.createStatement();
ResultSet rt = st.executeQuery(query);
rt.next();
String name = rt.getString("stu_name");
System.out.println(name);
st.close();
con.close();
}
}
Following is the error being thrown:
Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to parse the main URL sections.
My MySQL workbench version is 8.0.21 with same version for mysql-connector/J

Malformed database URL. Remove the second double slash and try again.