<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello,</div><div>this is not an overlook,</div><div>the less you expose (make public), the easier it is to change the implementation in the future.</div><div><br data-mce-bogus="1"></div><div>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).</div><div>So as a user, you can always use a List as parameter of a public method instead of an ArrayList.</div><div><br data-mce-bogus="1"></div><div>regards,</div><div>Rémi</div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"임민수" <godmlzkf1@naver.com><br><b>To: </b>"core-libs-dev" <core-libs-dev@openjdk.org><br><b>Sent: </b>Sunday, May 11, 2025 10:21:21 AM<br><b>Subject: </b>ArrayList print capacity<br></blockquote></div><div><style>p{margin-top:0px;margin-bottom:0px;}</style></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div style="font-size:14px; font-family:Gulim,굴림,sans-serif;">Hi<br><div><span>It seems that there is no code to print Capacity in ArrayList.</span></div><br><div><span>Vector, a friend of ArrayList, can be printed through capacity().</span></div><br><div><span>I want to add code to print Capacity of ArrayList as elementData.length.</span></div><br><div><span>Thank you.</span></div><br></div><table style="display:none"><tbody><tr><td><img border="0" src="https://mail.naver.com/readReceipt/notify/?img=FPePWz9vWr%2BSFxmsK6pOKqElM4p4FqMrF6MlKr3CM6FSpx%2BCKoumM4kvpAFCtzFXp6UmKAt5W4dQarFTb4ERWz0SbZ9vpBpgWXI0W4Gv1ZlTb4b%3D.gif"></td></tr></tbody></table><br></blockquote></div></div></body></html>