JDBC that multiple methods will use
i need to use JDBC for my java application to connect to database
but in my application i will have multiple methods (at least 25) that will perform different query and insert different data into my database
what is the best way to do this, instead of having to establish connection 25 times at beginning of everyone of my methods
public class MyApplication
// i was thinking of doing connection here, then in each of my method i just
do prepare statement and execute query
public static void main......
} // of MyApplication
however i run into error implementing this ( illegal start of expression)
i was thinking i just declare it at the top so all my method can have access to it....