So I gathered tokens from multiple lines of a text file and put those tokens into an array called tokens. With this code.
scanner = new Scanner(file);
while (scanner.hasNextLine()) {
if ((line = scanner.nextLine()).charAt(0) != '#') {
tokens = line.split(",");
}
}
(Its all in a try catch block)
I need to put all of those String tokens into a single array, how would I do this. My new array is stringTokens [] = new String [countLines *4].
The while loop redefines the elements in tokens with each iteration, how do I save those old elements in stringTokens and add the new elements tokens will get into stringTokens as well.