title: Error with trying to find Min&max when also finding average of "n" number of user inputs
body: <pre><code>package HW2_Min_Max;
  
  import java.util.Scanner; 
  
  public class HW2_Min_Max {
  
      public static void main(String[] args) {
  
          Scanner myScanner = new Scanner(System.in);
  
          System.out.println("Please input a positive interger that indicates number of positive intergers ");
  
          int number = myScanner.nextInt();
  
          while (number &lt;= 0) {
              System.out.println("Please input interger");
              number = myScanner.nextInt();
          }
  
          int i=1; //i is to store current iteration
          int sum=0; //sum is to store sum of the input 
          int x; //x is to store the user input
  
          while (i &lt;= number){
              System.out.println("Please input a positive interger ");
              x = myScanner.nextInt();
              sum = sum + x;
              i++;
          }
          int average = sum/number;
  
          System.out.println("The average is " + average);
  
          int max = Integer.MIN_VALUE;
          int min = Integer.MAX_VALUE;
  
          if (number &lt; min){
              min = number;
          }
  
          if (number &gt; max) {
              max = number;
          }
          System.out.println("The minimum value is " + min);
          System.out.print( "and the maximum value is" + max);
          }
      }
  }
  </code></pre>
  
  <p>1.^ this is where i am getting my problem, on the very last brace in Netbeans i am getting an error that says "class, interface, or enum expected" but i have no idea why. Excuse my ignorance as I am a very fresh beginner with java, let alone programming. </p>