File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Flex and the fly likes Does Modifying an Array immedtely reflects in a  ArrayCollection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Does Modifying an Array immedtely reflects in a  ArrayCollection " Watch "Does Modifying an Array immedtely reflects in a  ArrayCollection " New topic
Author

Does Modifying an Array immedtely reflects in a ArrayCollection

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

As ArrayCollection is a wrapper that exposes an Array.

If we modify the ArrayCollection the content of the Array is also modified instantly is viceversa is also the same ??

Means the question is if we modify the Array , will that immediately reflect the ArrayCollection ??(Assume we used ArrayCollection.refresh())??


Thanks in advance .


Save India From Corruption - Anna Hazare.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Array.refresh() applies any sorting an filtering - its also a method of the Array class, not the ArrayCollection class.

Just use the wrapper class and don;t expose the arry then you don't have to worry about keeping things in sync.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does Modifying an Array immedtely reflects in a ArrayCollection