# Copying ArrayLists without affecting original

**URL:** <https://discourse.processing.org/t/copying-arraylists-without-affecting-original/24820>\
**Category:** Coding Questions\
**Created:** [October 22, 2020, 1:25pm UTC](https://discourse.processing.org/t/copying-arraylists-without-affecting-original/24820 "2020-10-22T13:25:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [October 22, 2020, 1:37pm UTC](https://discourse.processing.org/t/copying-arraylists-without-affecting-original/24820/3 "2020-10-22T13:37:10Z")

</div>

> [@Functions argument](https://discourse.processing.org/t/functions-argument/11010/5):
>
> Or even better, use it as an actual full-fledged class, w/ constructors, fields & methods: triumph // https://Discourse.Processing.org/t/functions-argument/11010/5 // GoToLoop (v1.1) (2019/May/09) final Pair pair = new Pair(5, -10); void setup() { println(pair); // [5, -10] println(pair.calc('y')); // [-50, 540] println(pair.set(5, -10)); // [5, -10] println(pair.calc('u')); // [3, -2] println(pair.clone()); // [3, -2] exit(); } static final class…

> [@Problema con Class, extend y herencia](https://discourse.processing.org/t/problema-con-class-extend-y-herencia/11204/2):
>
> Disclaimer: I know English & Portuguese only. expressionless And although I can understand Spanish more or less, still I can’t properly reply using it, sorry. disappointed Anyways, we can always count on Google Translate, right? relieved[https://Translate.Google.com/#view=home&op=translate&sl=en&tl=es](https://Translate.Google.com/#view=home&op=translate&sl=en&tl=es) Indeed, if your method Animal::hijo() is something like this: class Animal { Animal hijo(final String name) { return new Animal(name); } } And you’ve got a class that extends i…

---

_[View the full topic](https://discourse.processing.org/t/copying-arraylists-without-affecting-original/24820)._
