# Arraycopy deprecated, is there an alternative method?

**URL:** https://discourse.processing.org/t/arraycopy-deprecated-is-there-an-alternative-method/18508
**Category:** Processing
**Created:** [March 8, 2020, 7:19pm UTC](https://discourse.processing.org/t/arraycopy-deprecated-is-there-an-alternative-method/18508 "2020-03-08T19:19:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jshaw3](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jshaw3/32/8336_2.png) [@jshaw3](https://discourse.processing.org/u/jshaw3)
#### Post date: [March 8, 2020, 7:19pm UTC](https://discourse.processing.org/t/arraycopy-deprecated-is-there-an-alternative-method/18508/1 "2020-03-08T19:19:10Z")

</div>

I’m doing some work with Minim and I found a few samples for visualizing waveforms that are using arraycopy. The samples seem to work as expected in the code, except I’m getting warnings that the method is deprecated. `the method arraycopy(object object) from the type PApplet is deprecated`. Code sample was from this post: [https://forum.processing.org/one/topic/how-to-generate-a-simple-waveform-of-an-entire-sound-file.html](https://forum.processing.org/one/topic/how-to-generate-a-simple-waveform-of-an-entire-sound-file.html)

Is there another method I should be using instead of arraycopy? Should I update it or just let the warning run and just ignore it?

Thanks.

---

<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: [March 8, 2020, 7:36pm UTC](https://discourse.processing.org/t/arraycopy-deprecated-is-there-an-alternative-method/18508/2 "2020-03-08T19:36:21Z")

</div>

> [@jshaw3](#):
>
> Is there another method I should be using instead of arraycopy?

Yes, use **arrayCopy()** in place of **arraycopy()**, even though they’re exactly the same thing: 🤪

> **[arrayCopy() / Reference](https://processing.org/reference/arrayCopy_.html)**
>
> Copies an array (or part of an array) to another array. The src array is copied to the dst array, beginning at the position specified by srcPosition and into the position specifie…

---

<div class="post-metadata">

### Author: ![jshaw3](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jshaw3/32/8336_2.png) [@jshaw3](https://discourse.processing.org/u/jshaw3)
#### Post date: [March 8, 2020, 7:45pm UTC](https://discourse.processing.org/t/arraycopy-deprecated-is-there-an-alternative-method/18508/3 "2020-03-08T19:45:53Z")

</div>

Thanks, should have noticed that! 🙃
