I'm pretty green to DBMS and I'm required to write a Java program using JDBC to interact with an Access database file. I'm wondering if it's better practice, or even possible, to initialize the Connection in main and pass it to each method as needed (closing it after the program has run) or to open and close a new connection in each individual method.
Sorry if this is a repeat but none of the questions/answers on I've found on this have been conclusive.