<prompt> Andika programu ya Java inayosoma data kutoka kwa faili ya CSV na kuihifadhi kwenye hifadhidata ya SQLite. Programu inapaswa kuunga mkono hoja za mstari wa amri kwa njia ya faili ya CSV ingizo, njia ya faili ya hifadhidata ya SQLite, na jina la jedwali. Inapaswa pia kushughulikia maingizo yanayorudiwa kwa kusasisha rekodi zilizopo na data mpya.PLINFORMAT  <response>: agiza com.opencsv.CSVReader;agiza com.opencsv.isipokuwa.CsvException;agiza java.io.FileReader;agiza java.io.IOException;kuagiza java.sql.Connection;agiza java.sql.DriverManager;agiza java.sql.PreparedStatement;agiza java.sql.SQLException;agiza java.util.List;darasa la umma CsvToSqlite utupu tuli wa umma String args ikiwa args.length ! 3 System.out.printlnMatumizi: java CsvToSqlite input.csv output.db table_name; kurudi; Kamba csvFile args0; Kamba dbFile args1; String tableName args2; jaribu Orodha rekodi readCsvcsvFile; storeInDatabaserekodi, dbFile, tableName; catch IOException CsvException SQLException e System.err.printlnKosa: e.getMessage; Orodha tuli ya kibinafsi readCsvString csvFile inarusha IOException, CsvException jaribu msomaji wa CSVReader CSVReader mpya FileReader mpya csvFile rudisha msomaji.somaYote; storeInDatabase ya utupu ya kibinafsiOrodha rekodi, String dbFile, String tableName hutupa SQLException ikiwa rekodi.isEmpty System.out.printlnHakuna data iliyopatikana katika faili ya CSV.; kurudi; Kamba vichwa records.get0; rekodi.ondoa0; Url ya kamba jdbc:sqlite: dbFile; jaribu Connection conn DriverManager.getConnectionurl createTableconn, tableName, headers; insertOrUpdateRecordsconn, tableName, headers, records; Private tuli utupu createTableConnection conn, String tableName, String headers hutupa SQLException StringBuilder sb StringBuilder mpya ; sb.appendUTENGENEZA JEDWALI IKIWA HAIPO .appendtableName. ongeza ; kwa int i 0; i headers.length; i sb.appendvichwai.ongeza TEXT; ikiwa i headers.length - 1 sb.append, ; sb.append;; jaribu PreparedStatement stmt conn.prepareStatementsb.toString stmt.execute ; Private tuli utupu insertOrUpdateRecordsConnection conn, String tableName, String headers, List records hutupa SQLException StringBuilder sb StringBuilder mpya ; sb.appendINGIZA AU RUDISHA NDANI YA .appendtableName.ongeza ; kwa int i 0; i headers.length; i sb.appendvichwai; ikiwa i headers.length - 1 sb.append, ; sb.append THAMANI ; kwa int i 0; i headers.length; i sb.append?; ikiwa i headers.length - 1 sb.append, ; sb.append;; jaribu PreparedStatement stmt conn.prepareStatementsb.toString kwa String record : records kwa int i 0; i 