Results 1 to 2 of 2

Thread: clone method

  1. #1
    gapper is offline Member
    Join Date
    Jan 2008
    Rep Power

    Default clone method

    I have two arraylist and I want to assign oney reference to another. So both can point to the same.

    I used the following:

    Java Code:
    a2 = a1;
    where a1 and a2 are arraylists. It works fine for me. I wanted to know how can I achieve this using clone method?


  2. #2
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    NewEngland, US
    Rep Power


    Have a looksee here... maybe you can infer from it.
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

Similar Threads

  1. How to clone an Array
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-14-2008, 08:46 PM
  2. An nslookup clone in Java
    By Java Tip in forum
    Replies: 0
    Last Post: 04-07-2008, 08:12 PM
  3. clone method
    By javaplus in forum New To Java
    Replies: 2
    Last Post: 01-30-2008, 09:47 AM
  4. clone problem
    By feniger in forum New To Java
    Replies: 13
    Last Post: 01-13-2008, 10:55 AM
  5. How to clone a JAXB object ?
    By simon in forum Advanced Java
    Replies: 1
    Last Post: 07-14-2007, 11:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts