I am trying to parse a generic array list to an array using standard methodology, but an error throws when converting an Object list to SimpleEntry list. Here is my code:
// Start with ArrayList of simple entries
AbstractMap.SimpleEntry<E, Integer>[] entries = (AbstractMap.SimpleEntry<E, Integer>[] ) new Object[arraylist.size()];
// Fill array with AL elements
What is the issue with this?
The error is as follows:
[Ljava.lang.Object; cannot be cast to [Ljava.util.AbstractMap$SimpleEntry;