I'm working on an app that register the answers each user introduces. For this purpose I have an Array where depending on what each user answers.
What I want to do is to get those answers and use them in another class for example in order to serialize these answers in XML.
I would like to know if there is a way of returning in a simpler way the answers. What I have now is the following code but its quite unproductive:
public static String[] Respuestas = {"","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""};
public static String getRespuesta1(){
return Respuestas[0];
}
public static String getRespuesta2(){
return Respuestas[1];
}
And so on until get Respuesta30().