tag:blogger.com,1999:blog-9150561117329868491.post4795469588023982996..comments2023-10-08T20:48:43.878+05:30Comments on My Journey Through IT: The story of the ArrayList imposterDinuka Arseculeratnehttp://www.blogger.com/profile/13924080326710656628noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-9150561117329868491.post-27817478309263735812011-07-29T08:55:21.222+05:302011-07-29T08:55:21.222+05:30Hi Sergey,
Thx for your views on it. Yes the immu...Hi Sergey,<br /><br />Thx for your views on it. Yes the immutability is the factor but i was wondering why they wanted to give such an implementation. Just being curious :).Dinuka Arseculeratnehttps://www.blogger.com/profile/13924080326710656628noreply@blogger.comtag:blogger.com,1999:blog-9150561117329868491.post-49700873706605652502011-07-28T12:34:53.884+05:302011-07-28T12:34:53.884+05:30The list returned from the Arrays.asList is backen...The list returned from the Arrays.asList is backened by the array itself, hence the immutability. BTW, I remember I saw it in the javadoc.Sergey Tyulkinhttps://www.blogger.com/profile/12913732887271390463noreply@blogger.comtag:blogger.com,1999:blog-9150561117329868491.post-41812806364518516372011-07-24T06:56:26.910+05:302011-07-24T06:56:26.910+05:30Hi Shamika,
Thx for leaving a comment. You call it...Hi Shamika,<br />Thx for leaving a comment. You call it immutable due to the fact that they have not provided implementations for the add and remove method isnt it? hmm that could be a reason too. Thx for adding that. Im sure other readers will also benefit from it.<br /><br />But the question for me is, why would they restrict the implementation as such, because as a client of the API i should Dinuka Arseculeratnehttps://www.blogger.com/profile/13924080326710656628noreply@blogger.comtag:blogger.com,1999:blog-9150561117329868491.post-42261248455907651342011-07-24T01:30:13.442+05:302011-07-24T01:30:13.442+05:30Hi Dinuka,
This is really cool explanation machan...Hi Dinuka,<br /><br />This is really cool explanation machan. One thing to add to ur explnation,<br /><br />java.util.Arrays$ArrayList is an immutable list where u cannot add or remove values from it. Protecting immutability is the reason (As i guess, correct me if im wrong) that they have seperate innerclass ArrayList implementation. If we want to add or remove values we have to make it a Anonymousnoreply@blogger.com