title: Why is this creating an infinite loop?
body: <p>I am trying to do a java program using methods in order to construct an hourglass figure that is a specific size based off of a user entry between 3 - 10. When i run the program however, I get an infinite loop.</p>
  
  <pre><code>   public static void main(String[] args){
  
     int height;
  
     Scanner keyboard = new Scanner(System.in);
     System.out.println("Enter an integer between 3 and 10 to control the" +
                         " heigth of the hour glass: ");
     height = keyboard.nextInt();                    
  
  
      line();
      topHalf();
      bottomHalf();
      line();
  
   }
  
  public static void line() {
  
    System.out.println("+");
    for (int i = 1; 1&lt;= 10; i++){
       System.out.println("-");
  
       System.out.println("+");    
         }   
      }
  
  
      public static void topHalf()
       {
            for(int line = 1; line &lt;= 3; line++){
            System.out.println("|");
            for (int i = 1; i&lt;= (line - 1); i++){
               System.out.println(" ");
            }
            System.out.println("\\");
            for (int i = 1; i &lt;= (6 - 2 * line); i++){  
               System.out.println(".");
            }
            System.out.print("/");
            for (int i = 1; i &lt;= (line - 1); i++){
               System.out.println(" ");
            }
            System.out.println("|");    
          }
      }
  
      public static void bottomHalf()
      {
         for (int line = 1; line &lt;= 3; line++){
            System.out.println("|");
            for (int i = 1; i &lt;= (3 - line); i++){
               System.out.println(" ");
            }
            System.out.println("/");
            for (int i = 1; i &lt;= 2 * (line - 1); i++){
               System.out.println(".");
            }
            System.out.println("\\");
            for (int i = 1; i &lt;= (3 - line); i++){
               System.out.print(" ");
            }
          }
      }
  
   }
  </code></pre>
  
  <p>I really have no idea what is going on, but i know for certain it is not an hourglass shape. The only thing that is happening when I run it is an infinite loop of + and then -. Would appreciate any help, thanks!</p>