public void throwUpdate(String query, Object... values){
        try {
            preparedStatement = connection.prepareStatement(query);
            for(int i=0; i < values.length; i++){                
                switch(values[i].getClass().getName()){
                    case "java.lang.String":
                        preparedStatement.setString(i+1, values[i].toString());
                        break;
                    case "java.lang.Integer":
                        preparedStatement.setInt(i+1, (int) values[i]);
                        break;                     
                }   
            }            
            preparedStatement.executeUpdate();
        } catch (SQLException ex) { System.out.println(errors.getError(102, ex)); }
        /*
        *   Use example:
        *       db.throwUpdate("INSERT INTO table VALUES(?,?,?)", param1, param2, param3);
        *       db.throwUpdate("DELETE FROM table WHERE param=?", param);
        *       db.throwUpdate("UPDATE table SET column=? WHERE param=?", column, param);
        */
    }