but you never assigned anything to the member variable. This code:
creates another variable called 'a' that is local to the fillArray() function. When the fillArray() function terminates, that local variable is destroyed. You used different code in your first example. Compare your two examples to see the difference.
nice idea from John with the constructor taking the array length. You would have two instances of the MyNumbers class, each with its own array of doubles, when you have to have two arrays, one with 100 and one with 1000 elements.
Another possibility is not to make the method void, but give a double  as a return type for fillArray.
BTW, you can but shouldn't code like double a = new double; Use double  a = new double; instead, only for better readability.