public static void InsertInToTable(String table,String[] values){   
        try {            
            con = DriverManager.getConnection(url, user, password);
            st =  con.createStatement();
            
            String insertSQL = "INSERT INTO "+table+"  VALUES (";
            for (int i = 0; i < values.length; i++) {
                insertSQL = insertSQL +"?";
                if(i<values.length-1){
                    insertSQL+=",";
                }
            }
            insertSQL+=")";
            PreparedStatement preparedStatement = con.prepareStatement(insertSQL);
            //System.out.println(insertSQL);
            for (int i = 0; i < values.length; i++) {
                preparedStatement.setString(i+1, values[i]);
            }
            preparedStatement.executeUpdate();

        } catch (SQLException ex) {
            //ex.printStackTrace();
            //Logger lgr = Logger.getLogger(Version.class.getName());
            //lgr.log(Level.SEVERE, ex.getMessage(), ex);

        } finally {
            try {
                if (rs != null) {
                    rs.close();
                }
                if (st != null) {
                    st.close();
                }
                if (con != null) {
                    con.close();
                }

            } catch (SQLException ex) {
                ex.printStackTrace();
                //Logger lgr = Logger.getLogger(Version.class.getName());
              //  lgr.log(Level.WARNING, ex.getMessage(), ex);
            }
        }
    }