# Modifying a text file in Android

**URL:** https://discourse.processing.org/t/modifying-a-text-file-in-android/39797
**Category:** Processing for Android
**Created:** [November 20, 2022, 4:00am UTC](https://discourse.processing.org/t/modifying-a-text-file-in-android/39797 "2022-11-20T04:00:52Z")
**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: [November 20, 2022, 12:44pm UTC](https://discourse.processing.org/t/modifying-a-text-file-in-android/39797/4 "2022-11-20T12:44:12Z")

</div>

Hello @a_random_cat,

This will help us help you:

> [@Guidelines—Asking Questions](https://discourse.processing.org/t/guidelines-asking-questions/2147):
>
> Summary (TL;DR) Ask complete questions to get better answers! Be specific. For example: I want to load an image. I tried using createImg() , and I expected the image to be on canvas, but what happened instead was the image showing up below the canvas. Isolate your problem and work in small steps. Share only the code directly related to your problem if it is part of a bigger project, and if something isn’t working, try the smallest code that could do the thing you want. Can we run your code to …

Working example to extract string from array:

```auto
String [] lines = loadStrings("mac.txt");

printArray(lines);
println();

String awewo = lines[0].toString();
println(awewo);

println();

```

mac.txt file contents:

```auto
aa:bb:cc:dd:ee
https://www.processing.org
https://discourse.processing.org/t/guidelines-asking-questions/2147
https://stackoverflow.com/help/minimal-reproducible-example
500.7
12

```

Console output on Processing JAVA:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/0/600b1746aed2a30d62753a41714fd6870212d083.png)

References:  
[https://processing.org/reference/loadStrings\_.html](https://processing.org/reference/loadStrings_.html)  
[https://stackoverflow.com/help/minimal-reproducible-example](https://stackoverflow.com/help/minimal-reproducible-example) \< This is in the Guidelines

`:)`

---

_[View the full topic](https://discourse.processing.org/t/modifying-a-text-file-in-android/39797)._
