0
Generic object of type array?
Can the generic parameter be an array? Like: Sample<String[]> s = new Sample<String[]>();
1 Resposta
0
Yes.
You can test it with an ArrayList:
ArrayList<int[]> myArrays = new ArrayList<>();
Now you can add integer arrays in this list.
ArrayList<String[]>() for String arrays and so on.