# Make a class use another class?

**URL:** <https://discourse.processing.org/t/make-a-class-use-another-class/23110>\
**Category:** Development\
**Created:** [August 7, 2020, 5:12pm UTC](https://discourse.processing.org/t/make-a-class-use-another-class/23110 "2020-08-07T17:12:23Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [August 10, 2020, 3:41am UTC](https://discourse.processing.org/t/make-a-class-use-another-class/23110/4 "2020-08-10T03:41:51Z")

</div>

I’ve got this example of a class named ArrayQueue which is implemented using : 😉  
`public class ArrayQueue<E> implements Queue<E>, Cloneable, Serializable {`

> [@LinkedList vs ArrayList](https://discourse.processing.org/t/linkedlist-vs-arraylist/19946/18):
>
> It works for me for some reason. thinking In order to test ArrayQueue, I’ve picked 2 old sketches using container ArrayDeque as a Queue: pick[Docs.Oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayDeque.html](http://Docs.Oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayDeque.html) And then replaced that w/ my own ArrayQueue, and both sketches were still perfectly OK:ok_hand

> <https://gist.github.com/GoToLoop/145418d1dfb062c7c41a630bce5b8374>
>
> There are more than three files. show original

---

_[View the full topic](https://discourse.processing.org/t/make-a-class-use-another-class/23110)._
