Hello, this is not an overlook, the less you expose (make public), the easier it is to change the implementation in the future.
Also, the collection API was design to avoid (if possible) to have more public methods in the implementation (ArrayList) than you have in the interface (List). So as a user, you can always use a List as parameter of a public method instead of an ArrayList. regards, Rémi > From: "임민수" <godmlz...@naver.com> > To: "core-libs-dev" <core-libs-dev@openjdk.org> > Sent: Sunday, May 11, 2025 10:21:21 AM > Subject: ArrayList print capacity > Hi > It seems that there is no code to print Capacity in ArrayList. > Vector, a friend of ArrayList, can be printed through capacity(). > I want to add code to print Capacity of ArrayList as elementData.length. > Thank you.