🔍
📢
String url = "jdbc:mysql://127.0.0.1:3306/database-name";
String user = "root", password = "1";
try (Connection conn = DriverManager.getConnection(url, user, password);
        Statement sta = conn.createStatement()) {
    ResultSet rs = sta.executeQuery("select 'Hello, World!'");
    rs.next();
    System.out.println(rs.getObject(1));
}