Search:

Type: Posts; User: helloworld922

Search: Search took 0.17 seconds.

  1. Replies
    14
    Views
    9,444

    Re: How to use this 2d ArrayList class?

    That still produces a soft copy. Java makes it rather cumbersome to get a good deep copy because it functions using references/pointers for objects. Even Cloneable objects sometimes return only...
  2. Replies
    14
    Views
    9,444

    Re: How to use this 2d ArrayList class?

    Do you mean a deep copy? Java works via references so it's a rather big pain to perform a deep copy.

    Your code simply gets a reference to the ArrayList at row s. You can copy that ArrayList, but...
  3. Replies
    14
    Views
    9,444

    Re: How to use this 2d ArrayList class?

    myArrayList2D.get(row).set(col, value);
  4. Replies
    14
    Views
    9,444

    Re: How to use this 2d ArrayList class?

    In Java, you can fake 2D ArrayLists by making an ArrayList of ArrayLists of some type (it's not as confusing at it sounds).

    I wrote that class as an example of how to utilize this, but it's really...
Results 1 to 4 of 4