I am trying to read from a text file but and those Strings separate into different attributes but I don't know how to follow after the first split.
Here is my code: What should be the offset of the getType() string?
try {
InputStream is = context.getAssets().open("Autoeval");
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
//Skips lines
for (int i = 0; i< questionNumber; i++) {
reader.readLine();
}
question = reader.readLine();
} catch (IOException e) {
e.printStackTrace();
}
}
public String getId() {
return question.substring(0, question.indexOf(";"));
}
public String getType() {
return question.substring(question.indexOf(";"));
}