title: jdbc connection sqlite return type of Connection class
body: <pre><code>public class SqliteConnect {
      private static SqliteConnect conn ;
  
      public static Connection dbConnector(){
  
          try{
              Class.forName("org.sqlite.JDBC");
              Connection conn = DriverManager.getConnection("jdbc:sqlite:C:\\Users\\Downloads\\InternArchive\\InternArchive\\InternDB\\InternshipDB.sqlite");
              JOptionPane.showMessageDialog(null, "Veritabanına Başarı ile Bağlanıldı!");
          }
          catch (Exception e) {
              JOptionPane.showMessageDialog(null, e);
              return null;
  
          }
      }
  }
  </code></pre>
  
  <p>I get an error : this method must return a result of type Connection. I know I can add return type or void, but I need this method.</p>