Does creating an array of generic objects, in this fashion, has any downsides or performance issues?
QueryObjects instances[] = (QueryObjects<String,String,String>[]) new Object[10];
Edit: I was even thinking if I could instead rely on this:-
QueryObjects instances[] = new QueryObjects[10];
The primary reason for this being, I do not want to fix the generic to <String,String,String>
because sometimes it can also be like <Integer,Integer,Integer>
for some elements of array. So I would like to give it as a runtime choice. Since this is mostly for application's internal work and not for any client side input, perhaps I should not be facing the danger of wrong inputs.