|
Author |
Topic: val1[i] = val2[i]; // how to not make a pointer? (Read 246 times) |
|
Brad
|
val1[i] = val2[i]; // how to not make a pointer?
« on: Jul 13th, 2003, 2:16am » |
|
i'm a little confused about the different things that can happen when you use the "=" operator. it seems like in some cases it puts the value of the item on the right into the item on the left. (this is what i had come to expect.) sometimes it seems like it makes one a pointer to the other so that they no longer act like seperate variables. what is happening and is there a way to stop that? any references to online docs on the subject would be appreciated. thanx.
|
|
|
|
benelek
|
Re: val1[i] = val2[i]; // how to not make a pointe
« Reply #1 on: Jul 13th, 2003, 5:02am » |
|
in the case of copying arrays and array data, you can use System.arraycopy(arrayFrom,startPoint,arrayTo,startPoint,numberOfItems) the java tutorial on sun's website is quite good for this topic: http://java.sun.com/docs/books/tutorial/java/index.html
|
|
|
|
|