Akses SQLite menggunakan JDBC (java)

import java.sql.*;

public class Main {
   public static void main(String[] args) throws Exception {
         Class.forName("org.sqlite.JDBC");
         Connection conn = DriverManager.getConnection("jdbc:sqlite:test.db");
         Statement stat = conn.createStatement();
         ResultSet rs = stat.executeQuery("SELECT Question, Answer, Type FROM Questions");
         while (rs.next()) {
            System.out.println(rs.getString("1"));
            System.out.println(rs.getString("2"));
            System.out.println(rs.getString("3"));
         }
         rs.close();
         conn.close();
  }
}