title: Java file cannot access methods even though class file is in same directory
body: <p>I was given only a .class file for homework and need to write a program that accesses its methods. Well, I have the .class file in the same directory, but I cannot access its methods, so my program won't compile! I've tried on JGrasp and Eclipse. Both 'cannot find symbol' (the method name).</p>
  
  <p>I am absolutely positive that I am using the right method names. Why isn't it working?? </p>
  
  <p>This is my code in Hw.java</p>
  
  <pre><code>public class Hw {
  
      public static void main(String[] args) 
      {
       int[] a1 = {1, 2, 3, 4, 5};
          int[] a2 = {5, 4, 3, 2, 1};
          int[] a3 = {1};
          int[] a4 = {2, 5, 3, 1, 4};
          int[] a5 = {1, 2, 1};
  
          System.out.println(sortA(a1));        
          System.out.println(sortA(a2));
          System.out.println(sortA(a3));
          System.out.println(sortA(a4));
          System.out.println(sortA(a5));        
    }
  }
  </code></pre>
  
  <p>And the error I'm getting in JGrasp:</p>
  
  <p>Hw.java:11: error: cannot find symbol
              System.out.println(sortA(a1));<br>
                                 ^
    symbol:   method sortA(int[])
    location: class Hw</p>