SyntaxFix
Write A Post
Hire A Developer
Questions
public T[] toArray(T[] a) - In this method we create a array with size of arraylist and pass it as argument and it will return array of element of arraylist
String[] arr = new String[list.size()]; arr = list.toArray(arr);