For design convenience I need to implement an attribute in a superclass as

double[][] myArray2D = new double[M][N]

which is used in most subclasses with M>>1 and N>>1. However, a couple of subclasses only require

double[][] myArray2D = new double[1][N]

or

double[] myArray1D = new double[N].

Is there a difference in memory allocation and in computational efficency between implementing myArray1D[N] and myArray2D[1][N]??

Thank you. AGA