I have recently been writing some code that asks the user questions about german.
br = new BufferedReader(new FileReader("C:\\Users\\Patrick\\Desktop\\Java Workspace\\germanTool\\src\\germanTool\\lesson1.txt"));
String[] engList = null;
String[] deuList = null;
int i = 0;
while (br.readLine() != null){
lineCount++;
line = br.readLine();
engList[i] = line.split("\t")[0];
deuList[i] = line.split("\t")[1];
}
Using this code I have been trying to read a file. On each line of the file there is a translation of an english word into german seperated by a tab. I want to write all of the english words into one array and all of the german ones into another array with the two counterparts having the same index in their arrays. How would I do this?