I have a matrix of objects that contains data in this form:
name A,2,name B
name C,3,name D
name E,4,name F
name G,5,name H
My code to process the data is:
for (int i = 0; i < numRow; i++) {
for (int j = 0; j < numColumn; j++) {
Object o = matrix[i][j];
String x = o.toString();
}
}
In this way, x assumes these values in turn:
name A,
2,
name B,
name C,
3
name D,
name E,
...
and so on.
From the table I must create a linked list of objects Expression(String, int, String),
for example:
Expression a = new Expression("name A", 2, "name B")
How could I extract the data from matrix in the right way to do this?