title: Errors in Java code
body: <p>I'm trying to get the highest and lowest number entered by user.  I got this. I just new in programming.  There are 3 errors.</p>
  
  <pre><code>import java.io.*;
  public class HighestToLowest
  {
      public static void main(String []args)throws IOException{
      {
          BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));        
  
          double[] input = new double[8];
          int index;
          int highIndex = 0;
          int lowIndex = 0;
          double sum = 0;
  
          System.out.println("Enter The Scores Of Judges: ");
          for (index = 0; index&lt;8; index++){
               System.out.print("Enter The Score" + (index + 1) + ": ");
               input[index] = Double.parseDouble(dataIn.readLine()); 
           }
  
           for (index = 1; index &lt; 8; index++)
               if(input[highIndex] &lt; input[index])
                  highIndex = index;
  
  
           for (index = 1; index &lt; 8; index++)
               if (input[lowIndex] &gt; input[index])
                   lowIndex = index;
  
           for (index = 0; index &lt; 8; index++)
               sum = sum + input[index];
           try
              {
                  input[index] = Double.parseDouble(dataIn.readLine());
              }
              catch(IOException e)
              {
                  System.out.println("error");
              }
  
              if(sum&gt;index)
              {
                  sum=highIndex;
              }
  
              if(sum&gt;=index)
              {
                  index=lowIndex;
              }                        
          }
  
          System.out.print("Highest is: + highIndex");
          System.out.print("Lowest is: + lowIndex");
  
           System.out.printf("The Contestant Receives a total of %.2f", (sum - highIndex - lowIndex)); 
  
  
  
      }
  }
  </code></pre>