File file = new File("test.txt");
try {
BufferedReader in = new BufferedReader(new FileReader(fileToRead));
String str;
while ((str = in.readLine()) != null) {
for (int i = 0; i < 35; i++){
char[] x = new char[34];
str = in.readLine();
x = str.toCharArray();
for (int f = 0; f < 34; f++){
map[f][i] = x[f];
}
}
in.close();
}} catch (IOException e) {
}
I am trying to read in a text file in android. I am going to send the array to a switch statement but the switch statement only uses the default so I am guessing that my file is not reading in. Any ideas what I am doing wrong, also where would I need to put the text file in order to read it? Thanks

New Topic/Question
Reply


MultiQuote





|