import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class Sqlite implements Database { @Override public Connection connect() { try { return tryConnect(); }catch(SQLException e) { System.err.println("Hiba! Az elérés sikertelen!"); System.err.println(e.getMessage()); return null; } } public Connection tryConnect() { String url = "jdbc:sqlite:database.sqlite"; Connection conn = DriverManager.getConnection(url); return conn; } }