Array of an array (Database)
- by Anne Mah Li'en
I am trying to print out an array of an array from database
Below are my codes.
I am able to retrieve all the values from the first array.
But error occurs when I am trying to retrieve the 2nd array from database.
<% ArrayList<Questionnaire> allCategories =QuestionnaireController.getQuestionnaireByCategoryAll();
for(int i=0;i<allCategories.size();i++){
Questionnaire allCategoriesQuestionnaire=allCategories.get(i);
out.println("<div class=\"silverheader\">" + "<a href= \"\">" + allCategoriesQuestionnaire.getCategory() + "</a>" + "</div>"
+ "<div class=\"submenu\">"
+ "ArrayList<Questionnaire> CategoriesSustainability =QuestionnaireController.getQuestionnaireByCategorySustainability();"
+ out.println(CategoriesSustainability.get(0).getCategory());
+ "<br />" + "</div>");
}
%>