# Splitting a String into an Array

**URL:** <https://discourse.processing.org/t/splitting-a-string-into-an-array/22495>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [July 9, 2020, 6:45am UTC](https://discourse.processing.org/t/splitting-a-string-into-an-array/22495 "2020-07-09T06:45:44Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 9, 2020, 1:47pm UTC](https://discourse.processing.org/t/splitting-a-string-into-an-array/22495/4 "2020-07-09T13:47:56Z")

</div>

> [@CKMJPEG](#):
>
> This is what I have so far.

This is not complete.

> [@CKMJPEG](#):
>
> ! am a beginner, and I have searched through youtube and the reference libraries on the processing website, and I am failing to understand data types and how to accesses data within the array.

We all have to start somewhere.  
Keep working at it!  
There are tutorials as well.

One of the best tools in a programmers tool chest is knowing the resources available to you and learning to navigate and use them.

This is a very short list:

> **Resources \< Click here to expand !**
>
> I encourage you to review the resources available here:
> 
> - The Processing _website_ has references, examples, tutorials, etc.  
> [https://processing.org/](https://processing.org/)
> - The Processing PDE (IDE) has lots to offer!  
> An exploration of the tabs will reveal what is available; libraries, tools and local examples there.
> - The Coding Train  
> [https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1\_aw](https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw)  
> [https://thecodingtrain.com/](https://thecodingtrain.com/)
> - Happy Coding  
> [Processing Tutorials - Happy Coding](https://happycoding.io/tutorials/processing/)
> - The source code can give insight if you are adventurous:  
> [GitHub - processing/processing: Source code for the Processing Core and Development Environment (PDE)](https://github.com/processing/processing)  
> Many of the Processing functions are here:  
> [processing/core/src/processing/core/PApplet.java at master · processing/processing · GitHub](https://github.com/processing/processing/blob/master/core/src/processing/core/PApplet.java)
> - The Processing Foundation  
> [https://processingfoundation.org/](https://processingfoundation.org/)  
> Check out the tabs.  
> In the education tab, there is a reference to the Coding Train.
> - And the Internet. `:)`

You will have to work through arrays first:

> **[Arrays](https://processing.org/tutorials/arrays/)**
>
> How to store and access data in array structures.

This was an excellent resource:  
[https://processing.org/tutorials/data/](https://processing.org/tutorials/data/)

> **[Java Data Types](https://www.w3schools.com/java/java_data_types.asp)**
>
> W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

`:)`

I pieced together 5 lines from the data tutorial, created a simple file.txt and was able to achieve this:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/67e9df778c29861e7d35d3d688a7c0363ca59c48.png)

I am not sharing code.

`:)`

---

_[View the full topic](https://discourse.processing.org/t/splitting-a-string-into-an-array/22495)._
