I am learning a bit about JDBC and MySQL and I had a question when connecting to the database, and it is knowing at what moment the connection to it is "opened".
-
When is the Connection object instantiated?.
Connection with = DriverManager.getConnection (.......);
-
When is a statement created with the Connection object?.
PreparedStatment ps = con.PrepareStatement (........);
-
When the PreparedStatment is running?.
ps.executeUpdate () or ps.executeQuery ()?
Thanks