title: How do i access a simple txt file in an Android app?
body: <p>I am creating an app where I list teachers and all the things they do at my school. I have 3 files, a class Teacher, which is an object that holds 7 string variables, a TeacherList class where i take the .txt file and extract my data from it in order to form the teachers. This is where my problem lies, where should i put the file? Heres the TeacherList code:</p>
  
  <pre><code>package com.mthebron.mthapp;
  import java.io.File;
  import java.io.FileNotFoundException;
  import java.util.Scanner;
  
  public class TeacherList {
  public static Teacher[] MakeList() throws FileNotFoundException{
      Teacher[] teachers=new Teacher[71]; 
      File list=new File("C:/Users/Gareth/Desktop/TeacherInformation.txt");
      Scanner iScanner=new Scanner(list);
      StringBuilder teachersBuilder=new StringBuilder();
      while(iScanner.hasNext()) {
          teachersBuilder.append(iScanner.nextLine());
          teachersBuilder.append("\n");
      }
      String fullList=teachersBuilder.toString();
      String[] seperatedList=fullList.split("'");
      String[] blah=seperatedList[0].split("\n");
      String temp=blah[0].substring(3, 9);    
      String name=temp;
      String department=blah[1];
      String planning=blah[2];
      String club=blah[3];
      String sport=null;
      String email=blah[5];
      String website=null;
      teachers[0]=new Teacher(name, department, planning, club, sport, email, website);
      System.out.println(teachers[0].getSportsCoached());
      for (int i = 1; i &lt; seperatedList.length; i++) {
          blah=seperatedList[i].split("\n");
          name=blah[1];
          department=blah[2];
          if (blah[3].equals("null")) {
              planning=null;
          }else planning=blah[3];
          if (blah[4].equals("null")) {
              sport=null;
          }else sport=blah[4];
          if (blah[5].equals("null")) {
              club=null;
          }else club=blah[5];
          if (blah[6].equals("null")) {
              email=null;
          }else email=blah[6];
          if (blah[7].equals("null")) {
              website=null;
          }else website=blah[7];
          teachers[i]=new Teacher(name, department, planning, sport, club, email, website);
      }
      return teachers;
  }
  </code></pre>
  
  <p>Where should i put the file and will it still be able to work as a file object?</p>