title: java passing a variable when class name is used twice in same class
body: <pre><code>public class test extends AbstractTableModel {
  
      public static void main(String[] args) {
      }
  
      public String valuePass(int rowIn)
      {
          String value = "open";
          return value;
      }
  
  
      test(mdpTEST parentPanel) {
          m_parentPanel = parentPanel;
      }
  
      ...
  }
  
  import demo.test;
  public class order{
  
      public void new() 
      {
          test blah = new test(null);
          String text = blah.valuePass(0);    
      }
  
  }
  </code></pre>
  
  <p>In the code above, "blah" should be referencing the class "test" which is public, however I'm told to change the visibility of "test()" to public as I get an error in the line: "test blah = new test(null);". I'm confused at why "public class test" is not being referenced by "blah" and how the second instance of "test()" is being utilized here. I appreciate any help in understanding this problem!</p>