hello,
i am new to java and im trying to solve some problems i found on the net
my objective is to read a file that contain:
"5
3: 5 8 3
2: 2 99
7: 5 3 7 3 3 66 88
2: 2 4
4: 2 5 7 3"
the 5 is the number of arrays
the numbers 3, 2, 7, 2, 4 are the number of elements in each of their respective arrays
ie: array number 1 has a size of 3 and contain 5 8 3
i need to write a code that takes first the number as to create 5 arrays, and then to put in each array their respective elements
in other words my goal is to have 5 arrays with each array their elements
i did it assuming these numbers were fixed, i assigned each array their element but i want a way to do it if to say i want to do it for another file, that has the same format, so this file in here is not a constant
i tried to make it by using 2d array but i messed up big time
so if someone can help me with it i would appreciate it
also it would be great if 2d array was used as i want to get used to it
thanks in advance