Results 1 to 2 of 2

Thread: clone method

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

    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?

    Regards.

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

    Default

    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, 09:46 PM
  2. An nslookup clone in Java
    By Java Tip in forum java.net
    Replies: 0
    Last Post: 04-07-2008, 09:12 PM
  3. clone method
    By javaplus in forum New To Java
    Replies: 2
    Last Post: 01-30-2008, 10:47 AM
  4. clone problem
    By feniger in forum New To Java
    Replies: 13
    Last Post: 01-13-2008, 11:55 AM
  5. How to clone a JAXB object ?
    By simon in forum Advanced Java
    Replies: 1
    Last Post: 07-15-2007, 12:56 AM

Posting Permissions

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