ArrayList newArray = new ArrayList(); newArray = urlList.getUrl(); for( int i = 0 ; i < newArray.size();i++) { System.out.println(newA
The first option is better as it allows you to pass in a typed array, which is then populated inside the method.
The second option returns an Object[] - so you would have to cast it to use String methods.