4 ms·
Line 115: this.entries = (T[]) Array.newInstance(type, capacity) You can't just say new T[capacity] in java.
by IncreasePosts 2y ago
Line 115: this.entries = (T[]) Array.newInstance(type, capacity)
You can't just say new T[capacity] in java.
- jcrites 2y agoTrue, but you can say `new Object[capacity]` and cast it to type `T[]`.