Summing integers in stream using Fenwick tree
Incorrect creation of fenwick tree

Your function create() is both incorrect and slow.  You had the correct function update() but you never used it.  Instead you tried to create the fenwick tree yourself but used an \$O(n^2)\$ algorithm to do so.  The correct way would have been just:

public static void create() {
    for (int i = 1; i &lt;= N; i++) {
        update(i, array[i]);
    }
}


This would have created the fenwick tree in \$O(n \log n)\$ time.

Bug

Another problem you have is when you update the array.  You do correctly update the fenwick tree, but you forgot to update the actual array.  In other words, after this line:


               update(x, y - array[x]);



you need this line:

                array[x] = y;