private void init() throws Exception {
        loadDB();//deserialize the database
        outer:
        while (true) {
            //show options
            System.out.println("Main menu:");
            System.out.println("1:Start Parsing\n2:Start Browsing\n3:Start Configuration System\n4:Export Current Database\n5:Import a database\n6:Exit");
            switch (Integer.parseInt(br.readLine())) {
                case 1://start the parser
                    BufferedReader br2 = new BufferedReader(new FileReader(FILES[2]));
                    String s = br2.readLine();
                    while (s != null) {
                        ar.add(s);//read the options in the parser configuration file
                        s = br2.readLine();
                    }
                    Codes.fixInput(ar);//same as before
                    Parser p = new Parser(db, ar.toArray(new String[ar.size()]), status);//initializing the database parser
                    p.parse();//handing control to the parser
                    break;
                case 2://start the editor
                    Editor e = new Editor(db, auto_entry);//initializing the editor
                    e.browse();
                    break;//the editor is capable of returning to the main menu
                case 3://configure everything again?
                    ConfigCLI.init();//configuration system is self-initialising, just hand over control to it
                    break outer;//that's all, after configuration, the program needs to be restarted anyway
                case 4://export the current database to a Database_Exported.csv file,which opens in MS Excel
                    new ExportImport().exporter(db, auto_entry);//initializing the export system and handing over control to it!
                    break;//we can come back to the main menu
                case 5://import an existing exported database(using this program on a different computer?)
                    new ExportImport().importer(db, auto_entry);//now it's the import system
                    break;//same as case 4
                case 6://No!!! Don't leave me behind!(Can't do anything about it anyway, can I?)
                    System.out.println("Exiting...");
                    System.exit(0);//Bye-Bye
                default://Stop making mistakes in input!
                    //I'm very considerate, I give everybody infinite chances
            }
        }
    }
private void init() throws Exception {
        loadDB()
        outer:
        while (true) {
           
            System.out.println("Main menu:");
            System.out.println("1:Start Parsing\n2:Start Browsing\n3:Start Configuration System\n4:Export Current Database\n5:Import a database\n6:Exit");
            switch (Integer.parseInt(br.readLine())) {
                case 1
                    BufferedReader br2 = new BufferedReader(new FileReader(FILES[2]));
                    String s = br2.readLine();
                    while (s != null) {
                        ar.add(s)
                        s = br2.readLine();
                    }
                    Codes.fixInput(ar)
                    Parser p = new Parser(db, ar.toArray(new String[ar.size()]), status)
                    p.parse()
                    break;
                case 2
                    Editor e = new Editor(db, auto_entry)
                    e.browse();
                    break
                case 3
                    ConfigCLI.init()
                    break outer
                case 4
                    new ExportImport().exporter(db, auto_entry)
                    break
                case 5
                    new ExportImport().importer(db, auto_entry)
                    break
                case 6
                    System.out.println("Exiting...");
                    System.exit(0)
                default
                   
            }
        }
    }
private void init() throws exception { loaddb() outer: while (true) { system.out.println("main menu:"); system.out.println("1:start parsing\n2:start browsing\n3:start configuration system\n4:export current database\n5:import a database\n6:exit"); switch (integer.parseint(br.readline())) { case 1 bufferedreader br2 = new bufferedreader(new filereader(files[2])); string s = br2.readline(); while (s != null) { ar.add(s) s = br2.readline(); } codes.fixinput(ar) parser p = new parser(db, ar.toarray(new string[ar.size()]), status) p.parse() break; case 2 editor e = new editor(db, auto_entry) e.browse(); break case 3 configcli.init() break outer case 4 new exportimport().exporter(db, auto_entry) break case 5 new exportimport().importer(db, auto_entry) break case 6 system.out.println("exiting..."); system.exit(0) default } } }