Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
IncreasePosts
· 1y ago · 0 comments
Line 115: this.entries = (T[]) Array.newInstance(type, capacity)
You can't just say new T[capacity] in java.
Comments
[–]
jcrites
1y ago
True, but you can say `new Object[capacity]` and cast it to type `T[]`.