Sometimes you need to convert ArrayList to Array. This is simple using toArray method of ArrayList. Signature of toArray method is:

Java Code:
public Object[] toArray(Object[] a)
Example:
Java Code:
ArrayList listArray = new ArrayList();
		
listArray.add("Germany");
listArray.add("Holland");
listArray.add("Sweden");
		
String []strArray = new String[3];
listArray.toArray(strArray);