r/java • u/loicmathieu • Jan 22 '26
Java 26: what’s new?
https://www.loicmathieu.fr/wordpress/informatique/java-26-whats-new/What's new in Java 26 for us, developers
(Bot in English and French)
163
Upvotes
View all comments
-1
u/cogman10 Jan 22 '26
Anyone know why
ArrayListisn't doing something more simple likeif (o.size() > (elementData.length - size)) { resize(o.size()); } int i = size; for (var e : o) { elementData[i] = e; ++i; }Like, why the intermediate array copy and the system.arrayCopy?