I am trying to create an array of generic type. I am getting error:
Pair<String, String>[] pairs; // no error here
pairs = new Pair<String, String>[10]; // compile error here
void method (Pair<String, String>[] pairs) // no error here.
I am confused. Any clues why this is happening.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…