title: Loop to check user's input for empty space
body: <p>I have an assignment to write an application that will take an input from the user, and store each answer in a String array. This application must also check the user's input for an empty value and re-prompt the user to enter their answer. The application must repeat ONLY the empty question, as there is scope for this application to take 50 questions.</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>for(iLoop=0; iLoop&lt;noOfQuest; iLoop++)
          {
              if(noOfEmails&lt;1)
              {
                  System.out.println("FILE_ERROR: Please ensure line \"noOfEmails\" is more than 0");
              }
              if(noOfQuest==1)
              {
                  System.out.println(prefinalMess);
                  System.out.println(questionArr[0]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(finalMess);
              }
              if(noOfQuest==2)
              {
                  System.out.println(questionArr[0]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(prefinalMess);
                  System.out.println(questionArr[1]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(finalMess);
              }
              if(noOfQuest==3)
              {
                  System.out.println(questionArr[0]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(questionArr[1]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(prefinalMess);
                  System.out.println(questionArr[2]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(finalMess);
              }
              if(noOfQuest==4)
              {
                  System.out.println(questionArr[0]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(questionArr[1]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(questionArr[2]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(prefinalMess);
                  System.out.println(questionArr[3]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(finalMess);
              }
              if(noOfQuest==5)
              {
                  System.out.println(questionArr[0]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(questionArr[1]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(questionArr[2]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(questionArr[3]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(prefinalMess);
                  System.out.println(questionArr[3]);
                  ansArray[iLoop]=ans.next();
                  System.out.println(finalMess);
              }
          }
  </code></pre>
  
  <p>I must also develop methods to check the input for each answer.</p>