For multiple arrays with different lengths use:
double[][] rain = new double[12][];
rain[0] = double[31];
rain[1] = double[28];
.
.
.
To read the data from a file try using DataInputStream or FileReader
or maybe StreamTokenizer, depending on the data format inside of the
file.