0

I think I am getting myself confused...I am calling a method (method B) which generates an array list. The calling is done from inside another method (method A). I am then trying to use the returned arrayList in method A but it seems to be empty. The arrayList generated in method B is not empty however so I think I've got some return ArrayList issue that I don't understand. Here is my code:

public void ExtractNew(String doc,String day) {

    ExtractTotal(docSlim,day);
}

public ArrayList<List<String>> ExtractTotal(String docSlim,String day) {
    ////Code for multidimensional arrayList creation omitted
            Arr2d.add(Arr);
            }
    }
    return Total;
}
Sebastian Zeki
  • 6,690
  • 11
  • 60
  • 125

1 Answers1

1

You're not adding to the Total ArrayList inside the ExtractTotal method.

Try this before returning it:

Total = Arr2d;

Assuming that Total is a class level variable here of course....

Tom Mac
  • 9,693
  • 3
  • 25
  • 35