I have tried this method but it creating new database in existing path folder and in result it printing there no such table:mytable.
import java.sql.*;
public class Database1 {
public static void main(String[] args) throws SQLException {
// Create a connection string
String connectionString = "jdbc:sqlite:mydatabase.db;cipher=WxSQLite3;cipher _type=System.Data.RC4;key=mypassword";
// Create a connection object
Connection connection = DriverManager.getConnection(connectionString);
// Create a statement object
Statement statement = connection.createStatement();
// Execute a query
ResultSet resultSet = statement.executeQuery("SELECT * FROM mytable");
while (resultSet.next()) {
// Get the data from the result set
String name = resultSet.getString("name");
System.out.println(name);
}
// Close the connection
connection.close();
}
}