Im trying to read 100 text files from a folder and save them to a matrix, and it works perfectly for the first 99 text files. This could be a trivial mistake, but I can not find it. Thank you in advance!
package mba_prob;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ConverTo {
public static void main(String[] args) throws NumberFormatException, IOException{
String target_dir = "/directory";
File dir = new File(target_dir);
File[] files = dir.listFiles();
for (File f : files) {
if(f.isFile()) {
double [][]thematrix = readMatrix(f);
}
}
}
}