Connecting Tech Pros Worldwide Forums | Help | Site Map

Array item value copy.

Bell
Guest
 
Posts: n/a
#1: Jul 18 '05
Is there a way to copy an array items' value (like clone) to another array?
Currently the array.clone() and System.arraycopy() are only copy the iten
reference.

Jun



Ryan Stewart
Guest
 
Posts: n/a
#2: Jul 18 '05

re: Array item value copy.


"Bell" <jundong889@sympatico.ca> wrote in message
news:brZLd.1963$lw4.529598@news20.bellglobal.com.. .[color=blue]
> Is there a way to copy an array items' value (like clone) to another array?
> Currently the array.clone() and System.arraycopy() are only copy the iten
> reference.
>[/color]
Those methods do copy the values. It's just that the values happen to be
references. There is no built in way to make a deep copy of an array. You have
to do it yourself.

Please direct your posts to comp.lang.java.help in the future. This group is
deprecated.


Wiseguy
Guest
 
Posts: n/a
#3: Jul 18 '05

re: Array item value copy.


"Ryan Stewart" <zzanNOtozz@gSPAMo.com> wrote in
news:demdnUK6CeOzWJ3fRVn-gQ@texas.net:
[color=blue]
> "Bell" <jundong889@sympatico.ca> wrote in message
> news:brZLd.1963$lw4.529598@news20.bellglobal.com.. .[color=green]
>> Is there a way to copy an array items' value (like clone) to another
>> array? Currently the array.clone() and System.arraycopy() are only
>> copy the iten reference.
>>[/color]
> Those methods do copy the values. It's just that the values happen to
> be references. There is no built in way to make a deep copy of an
> array. You have to do it yourself.
>
> Please direct your posts to comp.lang.java.help in the future. This
> group is deprecated.
>
>
>[/color]

Deprecated? I've never seen an FAQ posted on here and the group doens't
seem to be moderated, so how the tar can it be "deprecated?"


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Ryan Stewart
Guest
 
Posts: n/a
#4: Jul 18 '05

re: Array item value copy.


"Wiseguy" <noone@all.com> wrote in message
news:Xns95F1F07273230nooneallcom@38.119.71.210...[color=blue]
> Deprecated? I've never seen an FAQ posted on here and the group doens't
> seem to be moderated, so how the tar can it be "deprecated?"
>[/color]
There's a discussion of it here:
http://www.talkroot.com/archivee/ind...precated?.html

A bit light on detail though, but regardless of the history, this group is not
carried by all news servers, which means not everybody sees it. As for the FAQ,
how long have you been visiting comp.lang.java? Here's some:
http://groups-beta.google.com/groups...ng.java+faq%22

You might be noticing that there have been no FAQs *recently*. That's because
this group was replaced by the many other comp.lang.java.* groups


Closed Thread