title: Trying to learn JAVA and I want to write 99 bottles of beer song
body: <p>I am very new to JAVA programming and have only programmed in Python before. 
  I'm trying to figure out why I'm getting a duplicate line of " # of bottles of beer on the wall" when I execute my code.</p>
  
  <pre><code>    package BeerBottle;
  
      public class BeerBot {
    public static void main (String [] args){
        int beerNum = 99;
        String word = "bottles";
  
        while (beerNum &gt; 0) {
  
        if (beerNum == 1) {
        word = "bottle";
        } else {
        word = "bottles";
        }
      System.out.println(beerNum + " " + word + " " + "of beer on the wall");
      System.out.println(beerNum + " " + word + " " + "of beer");
      System.out.println("Take one down");
      System.out.println("pass it around");
      beerNum = beerNum -1;
  
      if (beerNum &gt; 0) {
          System.out.println(beerNum + " " + word + " " + "of beer on the wall"); // I think it might be this line but I need it 
      } else {
          System.out.println("No more bottles of beer on the wall");
      }
      }
     }
  </code></pre>
  
  <p>} </p>
  
  <p>The result I get is this:</p>
  
  <pre><code>    2 bottles of beer on the wall
      2 bottles of beer on the wall (duplicate)
      2 bottles of beer
      Take one down
      pass it around
      1 bottles of beer on the wall
      1 bottle of beer on the wall (duplicate)
      1 bottle of beer
      Take one down
      pass it around
      No more bottles of beer on the wall
  </code></pre>
  
  <p>Thank you for your help</p>