Array of an array (Database)

Posted by Anne Mah Li'en on Stack Overflow See other posts from Stack Overflow or by Anne Mah Li'en
Published on 2012-07-11T03:12:09Z Indexed on 2012/07/11 3:15 UTC
Read the original article Hit count: 154

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>");
                                                            } 

                                                            %>

© Stack Overflow or respective owner

Related posts about database

Related posts about arrays