My Recommendation (aside from changing using double[][] to something like List<List<Double>>) would be to go through each text line as such:
InputStream fis;
BufferedReader br;
String line;
fis = new FileInputStream("the_file_name");
br = new BufferedReader(new InputStreamReader(fis, Charset.forName("UTF-8")));
while ((line = br.readLine()) != null) {
// Deal with the line
}
// Done with the file
br.close();
br = null;
fis = null;
With this, you should be able to get each individual 'line' of the file. The reason I mention above using the List<List<Double>> instead of double[][] is because you get two things out of that:
1) dynamic resizeability. Even if you know the size and want to give that list a default size to help with performance, you aren't LIMITED to that size, which is worth it's weight in.. flops? programmers gold.
2) using the primitive double (lowercase d) as opposed to the Java object Double (uppercase D) really kill you as far as not getting access to a LOT of great methods and useability built into Double (capitol D object). for more explanation on this, see: Double vs. double
Also note, the code above has no error checking, so you'll want to build some of that into it, it's a pretty basic implementation.
EDIT::
Alright, so in your code that you posted at: code snipped you have a double for-loop INSIDE of the readLine() loop. like so:
while ((line = br.readLine()) != null) {
for (int i = 0; i < rows; i++){
for(int j = 0; j< columns; j++){
line = array[i][j];
}
}
}
Now, there are two problems with this:
1) you are setting LINE equal to the content of array[i][j] which means nothing, since array is just an empty 2-dimensional array.
2) for EVERY line in the text file you are looping 1302 times (and then some more because you're doing (1302 * columns) * 1302
really what this code above does, is it takes care of your 'row' loop. so instead of what you're doing, just do:
int i = 0;
while ((line = br.readLine()) != null) {
array[i][0] = line;
i++
}
that will fill up your array with all of the strings from the file.