so I have the following bit of code:
while((line = reader.readLine()) != null) {
String[] row = line.split(",");
this.table.add(row);
Where this.table was initiated using:
ArrayList table = new ArrayList();
Then when I tried to get the length a row in table like so:
for(int i=0; i<table.size(); ++i){
for(int j=0; j<table.get(i).length; ++j) {
//some code
}
It (underlines get(i).length; and gives me an error saying that it cannot find symbol. symbol: length location: class Object.
What's wrong? Does string.split() not return an array? If it does, why can I not use any of the array class methods / variables?
Thank you!