toarray, to convert from arraylist to array this method can be used.
I've been learning how to program with java and I haven't got any clear explanation about the difference of LinkedList's …