TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kobycool68
NA
23
0
ArrayList
May 25 2004 8:59 AM
hello i have two classes class1 { private ArrayList arr; public class1() { this.arr = new ArrayList(); arr.add("bye"); arr.add(.....); . . . . } void func1() { new class2(this.arr); } public ArrayList arr1 { set{this.arr=value} get{return this.arr} } } class2 { class1 c1; private ArrayList arrCopy; public class2(ArrayList arr) { this.arrCopy = arr; } ........ void func() { c1.arr1.insert(0 , "hello"); } my question is: suppose i change element 0 from "bye" to "hello" in class2 , why arrCopy is change element 0 too???? how can i avoid it?? thank you very much koby
Reply
Answers (
1
)
Editing data in a grid and updating error
How we use the events on datagrid