reading a numeric text file in Android Studio and put each number in an array index
<p>I have a text file like this: p102_triangles.txt which contains data like this:</p>

<p>-340,495,-153,-910,835,-947</p>

<p>-175,41,-421,-714,574,-645</p>

<p>-547,712,-352,579,951,-786</p>

<p>419,-864,-83,650,-399,171</p>

<p>-429,-89,-357,-930,296,-29</p>

<p>-734,-702,823,-745,-684,-62</p>

<p>-971,762,925,-776,-663,-157</p>

<p>...</p>

<p>I want to read this txt file in Android Studio and put each number in an integer array index.</p>

<p>this is my java file:</p>

<pre><code>package com.example.davinci.trianglecontainment;

import android.app.Activity;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class triangleContainment extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.triangle_containment_layout);
    }

}
</code></pre>

<p>and this is my folder tree in the application:</p>

<p><a href="https://i.stack.imgur.com/2B4sK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2B4sK.png" alt="enter image description here"></a></p>