~/ learn/ java-from-zero/ cards/ JDBC architecture: drivers, connections & the four core interfaces
1 of 3

Type a DriverManager.getConnection call

Type a DriverManager.getConnection call

Answer

Connection conn = DriverManager.getConnection( "jdbc:postgresql://localhost:5432/mydb", "alice", "s3cret");

The JDBC URL identifies the driver (postgresql), host, port, and database. DriverManager finds the matching Driver implementation from the jars on the classpath.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/e2581eb0-6bac-4452-bc1c-018638c166da/flashcard utf-8 LF