new double creates an array of double. All these elements are still null. You need to initialize them like Wouter suggested. If you provide both dimensions when creating, new double, then all the elements of the outer array are also initialized.
Mohamed Sanaulla wrote: . . . Update: Had typed this, but was really late to post the reply . . .
You have come across the term "race condition" in multi-threading? Well, these discussions are called threads, and you and Wouter were multi-threading in a race condition This time, Wouter won. Next time, good luck to you