In java: I am reading a file named fn. It is a text file, and the first number gives the number of lines and characters:
Example:
4
AFBA\n
BBBB\n
EFHE\n
EFJH\n
Theres a new line after each 4 characters. This goes for 4 rows.
What I have so far is:
File fp = new File(fn);
FileReader fr = new FileReader(fp);
BufferedReader bfr = new BufferedReader(fr);
How do I create a java algorithm to store this data in a data structure, such as an array list, array, stack, etc.
Thanks so much. I'm just getting started programming so sorry if this question doesn't match the Stack overflow rhetoric.