title: Why do I keep getting .class expected here? None of the usual problems are the culprit
body: <p>In all the other cases I could find, it was due to code not in a method or incorrect bracketing, however I have checked all these. My code is this;</p>
  
  <pre><code>import java.util.*; 
  public class averages {
     public static void main(String[] args) 
     {
        //initializing
        double mean = 0;
        double deviation = 0;
        int i = 0;
        double dataset = new double[10];
        double sum = 0;
        double subdev = 0;
        double subsum = 0;
        double dev = 0;
  
        //getting the numbers
        for (i = 0; i &lt;= 9 ; i++)
        {
           Scanner input = new Scanner(System.in);
           System.out.println("Enter a number");
           dataset[i] = input.nextDouble();
        }
  
        //calling the function to get 
        avgarray(dataset[]);
        System.out.println("Average is " + mean);
        devequasion(dataset[]);
        System.out.println("Deviation is " + subdev);
     }
     public static double avgarray(double[] arraydata)
     {
        sum = 0;
        for (i = 0; i &lt;= 9 ; i++)
        {
           sum += arraydata[i];
        }
        mean = sum / 10;
        return mean;
     }
  
     public static double devequasion(double[] devdata)
     {
        subsum = 0;
        for (i = 0; i &lt;= 9 ; i++)
        {
           subsum += devdata[i]*devdata[i];
        }
        dev = math.sqrt((sum - avgarray(devdata[]))/ 9.0);
        return dev;
     }
  }
  </code></pre>
  
  <p>Everything looks correct, but the errors will not go away.</p>