Array item value copy.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bell

    #1

    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.arraycop y() are only copy the iten
    reference.

    Jun


  • Ryan Stewart

    #2
    Re: Array item value copy.

    "Bell" <jundong889@sym patico.ca> wrote in message
    news:brZLd.1963 $lw4.529598@new s20.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.arraycop y() 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.


    Comment

    • Wiseguy

      #3
      Re: Array item value copy.

      "Ryan Stewart" <zzanNOtozz@gSP AMo.com> wrote in
      news:demdnUK6Ce OzWJ3fRVn-gQ@texas.net:
      [color=blue]
      > "Bell" <jundong889@sym patico.ca> wrote in message
      > news:brZLd.1963 $lw4.529598@new s20.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.arraycop y() 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 =----

      Comment

      • Ryan Stewart

        #4
        Re: Array item value copy.

        "Wiseguy" <noone@all.co m> wrote in message
        news:Xns95F1F07 273230nooneallc om@38.119.71.21 0...[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:


        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:


        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


        Comment

        Working...