package cc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import static java.lang.Class.*;
public class test{
public static void main(String[] args){
try {
Class.forName("com.mysql.cj.jdbc.Driver");
String url="jdbc:mysql://localhost:3306/test?serverTimezone=UTC";
long start= System.currentTimeMillis();
Connection c =DriverManager.getConnection(url,"root","root");
long over= System.currentTimeMillis();
System.out.println(c);
System.out.println(over-start);
}catch (ClassNotFoundException e){
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
07-13