I have to make a method...

public static void multiply(File file)

This method receives a file object from which to read 2 numeric matrices. The method multiplies the matrices and writes the result matrix back to the given file.

Matrices in the input file are placed side by side. For example, the data below represents a 4x2 matrix (left) and a 2x3 matrix (right). Note that row 1 of both matrices is always on the first line of the file, and that there will be no blank lines in the file.

1 2 1 2 3

3 4 4 5 6

5 6

7 8

So my question is... How would I go about separating the matrices? Or even more specifically, differentiating the two in java?

The professor never taught us this in class so I assume he expects us to get creative.. But I've been stuck for a week. Any ideas?