473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Array item value copy.

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
Jul 17 '05 #1
3 4306
"Bell" <ju********@sympatico.ca> wrote in message
news:br*******************@news20.bellglobal.com.. .
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.

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.
Jul 17 '05 #2
"Ryan Stewart" <zz********@gSPAMo.com> wrote in
news:de********************@texas.net:
"Bell" <ju********@sympatico.ca> wrote in message
news:br*******************@news20.bellglobal.com.. .
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.

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.


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 =----
Jul 17 '05 #3
"Wiseguy" <no***@all.com> wrote in message
news:Xn*************************@38.119.71.210...
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?"

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
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: lawrence | last post by:
I wanted to test xml_parse_into_struct() so I took the example off of www.php.net and put this code up on a site: <?php $simple = <<<END <item>
5
by: Nico | last post by:
Hello folks, I am currently storing a set of objects inside an array, $itemlist = array(); $itemlist = new item("myitem"); //... and I am looking to develop a search function, which...
10
by: Dennis Myrén | last post by:
Hi. I have an array of struct. My question is, if i do: STRUCT a = new STRUCT ; STRUCT s = new STRUCT(); a = s; since STRUCT is a value type, when assigning element 0 of the STRUCT array...
8
by: Maileen | last post by:
Hi, I would like to have something like an array (something like a collection) in order to store the following things : company name1, new1, old1, in1, out1 company name2, new2, old2, in2,...
5
by: Sam | last post by:
Hi All I have couple of question regarding property of a class and structures. **** ---- Here is my class and structure ---- ***** 1. Public Structure MyPoint 2. Dim p As Point 3. ...
1
by: Matthew | last post by:
Using .NET 1.1 I trying to consume a web service that returns an integer and an array of type string which I declare and use line this Dim Results() As String Me.txtMain.Text =...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
4
by: Ronald Raygun | last post by:
I want to store objects in ana array and then iterate through the array, retrieving a (reference) to each object in the array, and calling a method on the array. I am not sure how to do it, but...
6
by: npankey | last post by:
I've started experimenting with template metaprogramming in a small project of mine. What I'm trying to accomplish is to generate a static array of templated objects that get specialized based on...
5
by: ctj951 | last post by:
I have a very specific question about a language issue that I was hoping to get an answer to. If you allocate a structure that contains an array as a local variable inside a function and return...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.