The answer is already posted but note that this will pass the ArrayList by reference. So if you make any changes to the list in the function it will be affected to the original list also.
AnalyseArray(ArrayList list)
{
//analyse the list
//return value
}
call it like this:
x=AnalyseArray(list);
or pass a copy of ArrayList:
x=AnalyseArray(list.clone());