Re: Write-Through Hi: The List writes through to the Array and vice versa but the Array size can not change.
Respects, JKid314159 http://existentialists.blogspot.com/ > > Dear Java Programmer: > > > "In fact, this program can be made even shorter and faster. The Arrays class > has a static factory method called asList, which allows an array to be viewed > as a List. This method does not copy the array. Changes in the List write > through to the array and vice versa. The resulting List is not a > general-purpose List implementation, because it doesn't implement the > (optional) add and remove operations: Arrays are not resizable. " > Actually when you make changes to the list, the list is used to make the changes to the underlying array (changes are reflected in the underlying array through the list), and vice versa when you make changes to the array the changes are reflected to the list, that is what write through to means here. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
