title: Java loop not working
body: <p>So I'm writing a small program but my while-loop does not seem to work, I've looked all over the internet for tutorials and I know that I need to increase J but I can't seem to figure out where because when I get one thing fixed another part stops working!
  Could someone please tell me what I have to do to fix this?</p>
  
  <pre><code>int j=0;//which group we're checking
              while(response==0){
                  {
                      if(inArray(quote.toLowerCase(),greetings[j*2]))
                      {
                          response=2;
                          int r=(int)Math.floor(Math.random()*greetings[(j*2)+1].length);
                          addText("\n--&gt;Miku:\t"+greetings[(j*2)+1][r]);
                          try (BufferedReader br = new BufferedReader(new FileReader("mikuname.txt"))) {
                              String name;
                              while ((name = br.readLine()) != null) {
                              addText(name +"!");
                              }
                          } catch (IOException e1) {
                              // Do something with the IO problem that occurred while reading the file
                          }
                      }
                  }
                  if(response==0)
                  {
                      if(inArray(quote.toLowerCase(),chatBot[j*2]))
                      {
                          response=2;
                          int r=(int)Math.floor(Math.random()*chatBot[(j*2)+1].length);
                          addText("\n--&gt;Miku:\t"+chatBot[(j*2)+1][r]);
                      }
                  }
                  if(response==0)
                  {
                      response=1;
                  }
              }
  </code></pre>