title: How to make SQL connection statements common
body: <p>I have to execute several SQL queries in different methods of the same class. Is there any way to make these statements common and can I use the same con,statement variable in all the methods to execute queries.</p>
  
  <pre><code>Class.forName("com.mysql.jdbc.Driver").newInstance();
  Connection con = DriverManager.getConnection ("jdbc:mysql://localhost:3306/kamal","root","root");
  Statement statement=con.createStatement();
  </code></pre>