title: Cannot find symbol in main method
body: <p>Made a Tester class to test how a method passes arguments into a parameter.</p>
  
  <p>Below is the code that I have written up.</p>
  
  <pre><code>public class Testcalculate {
  
  public static void main (String [] args){
  
   Testcalculate c = new Testcalculate();
   c.add(40, 50);
  
  } // end main
  
  } // end class
  
  class calculate {
  
   public void add(int x, int y) {
  
   int a = x + y;
  
   System.out.print("Total is: " + a);
  
  }
  
  }
  </code></pre>
  
  <p>The error message that I get says:</p>
  
  <pre><code>Testcalculate.java:7: cannot find symbol
  symbol : method add(int, int)
  location: class Testcalculate
  c.add(40,50); 
  </code></pre>
  
  <p>I have passed arguments into the method, using the correct values of type int.
  I just don't understand what is causing this issue. I've even tried putting the public keyword before the add method declaration in the second class, thinking it may be out of scope, but that doesn't help.</p>
  
  <p>Both classes are placed within the same text file.</p>