title: How to fix ".class expected" in Java
body: <p><strong>Main</strong></p>
  
  <pre><code>import java.util.Scanner;
  
  public class JT1{
      public static void main(String args[]){     
        String CopyArgs[] = new String[args.length];
        for(int i = 0; i &lt; args.length; i++) {
           CopyArgs[i] = args[i]; 
  
       }
  for (int i = 0; i &lt; CopyArgs.length; i++) {
  System.out.println(CopyArgs[i]); 
  }
  for (int j = 0; j &lt; CopyArgs.length; j++) 
      System.out.println(CopyArgs[j] + " is " + CopyArgs[j].length() + " characters ");
  
  //Method that uses CopyArgs to scan every single charAt and find the number of vowels for each word
  MetodiJT1.NumVocali(CopyArgs[]);
  }
  }    
  </code></pre>
  
  <p><strong>Method class</strong></p>
  
  <pre><code>public class MetodiJT1  {
  
  public static void NumVocali (String a[]){
      int n = 0;
      for(int l=0; l &lt; a.length; l++){
          for(int k=0; k &lt; a[l].length(); k++){
              switch (a[l].charAt(k)){
                   case 'a':
                   case 'e':
                   case 'i':
                   case 'o':
                   case 'u':
                      n++;
                      break;
                   }
          }
      }
      System.out.println(n);
  }   
  }
  </code></pre>
  
  <p>I don't know how to fix this error, I feel like I'm missing something  </p>
  
  <pre><code>     JT1.java:18: error: '.class' expected
       MetodiJT1.NumVocali(CopyArgs[])
                                    ^        
  </code></pre>
  
  <p><code>JT1.java</code> and <code>MetodiJT1.java</code> are two different classes and I'm trying to use NumVocali to print the number of vowels for every <code>a[l]</code>.</p>