title: When reading in file, and use nextLine() to move to the next line, it causes the read in to skip every other line
body: <pre><code>try {
          FileReader in = new FileReader("generibrand.txt");
          input = new Scanner(in).useDelimiter(":");
      } catch (FileNotFoundException fileNotFound) {
          JOptionPane.showMessageDialog(null, "No File Found!");
      }
      try {
          while (input.hasNextLine()) {
              String drugClass = input.next();
              if (drugClass.equals("ab")) {
                  meds = new Antibiotic(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("av")) {
                  System.out.println(drugClass);
                  meds = new Antiviral(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("ur")) {
                  meds = new UrinaryAntiInfective(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("ps")) {
                  meds = new Parasympathomimetic(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("sa")) {
                  meds = new Sympathomimetic(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("no")) {
                  meds = new Opiate(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("ad")) {
                  meds = new Antidepressant(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("du")) {
                  meds = new Diuretic(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("db")) {
                  meds = new Diabetic(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("cs")) {
                  meds = new CNSStimulant(input.next(), input.next(), input.next());
                  medList.add(meds);
              } else if (drugClass.equals("cd")) {
                  meds = new Cardiac(input.next(), input.next(), input.next());
                  System.out.println(meds.getBrandName() + ((Cardiac) meds).getCategory());
                  medList.add(meds);
              } else if (input.hasNextLine()) {
                  input.nextLine();
              }
          }
      } catch (Exception ex) {
          JOptionPane.showMessageDialog(null, "Something Went Wrong!");
      }
  </code></pre>
  
  <p>I have tried numerous tests to see what exactly was being displayed... The most confusing part for me is if I stick in a <code>System.out.println(drugClass);</code> at the beginning before all the IF statements it will print out each of the words line after line, and print ALL of them. But when I take out that print line, and refrain from using <code>input.nextLine()</code> to move to the next line in the text file, it only enters the first if statement, and my ArrayList of meds does not get populated. When I DO use <code>input.nextLine()</code> in my code it skips every other line when iterating through the file...</p>
  
  <p>Fairly confused how I am getting such odd results, anyone have any idea of why this is occuring? Thanks in advance!</p>