File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Another question regarding arrays
Joined: Mar 26, 2004
Jun 28, 2004 21:27:00
int newArray = arrayReferencePassedAsMethodParameter.clone();
equals to copying the returned array into a new array? I mean, do I make sure that I dont refer to the reference that could be modified somewhere else?
Thanks in advance,
Joined: Mar 08, 2001
Jun 28, 2004 23:30:00
Yep. It is safe as long as it is an array of primitive datatypes.
<B>Hari Gangadharan</B><BR>Unix is user friendly..<BR>but it chooses to whom it is friendly with!
I agree. Here's the link:
subject: Another question regarding arrays
Shuffling array of ints
How to make a deep copy of a multidimensional int array?
Array.clone() not producing a distinct copy?
delete an element from an array
Increasing Array Size
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015