Long story short, I need a list of arrays that can be of varying types (int, double, String, byte, etc.). Now the thing is I have gotten this to work with an unspecified ArrayList object, but every time I retrieve an array from the ArrayList, I'm converting it to the type of array I want e.g. ((double[]) arraylist.get(j))[i] then doing what I have to do.
But my worry is: This is a program that will be iterating hundreds of times and I feel like this is very inefficient and slow. Would rather just have a list of references instead of requiring constant conversions. So any thoughts on alternatives would be appreciated.
List<List<? extends Object>>orList<Object[]>