title: Add class in java
body: <p>I use NetBeans 6.7.1 and I'm more used to C and php than Java.</p>
  
  <p>I have a .class file containing "public class myclass". And in that class I have a private array and a public function getArr returning that array.</p>
  
  <p>In the main class I have this</p>
  
  <pre><code>Object mcl = new myclass();
  </code></pre>
  
  <p>myclass is found by NetBeans and the above is accepted. But</p>
  
  <pre><code>String[] arr = mcl.getArr();
  </code></pre>
  
  <p>throws "Cannot find symbol" for getArr.</p>
  
  <p>The file containing that class is in the project and the class found in code completion. But not the function, or I should probably call it a method.</p>
  
  <p>I don't know if this is Java or NetBeans specific. But how do I get the main class to understand what it can find in my new class? And the compiler?</p>
  
  <p>Am I missing some declaration?</p>