title: java "cannot find symbol" - how to import a file in the same directory?
body: <p>I have two java files in a directory, neither of them are in a package. I want one of them to be able to reference the other. What is the right way to do this? </p>
  
  <p>Currently in Class A, I'm trying to reference class B, and getting this error:</p>
  
  <pre><code>[javac] A.java:11: cannot find symbol
  [javac] symbol  : constructor B(java.lang.String)
  [javac] location: class B
  [javac]         B b = new B(path);
  [javac]               ^
  </code></pre>
  
  <p>Nothing below worked:</p>
  
  <ul>
  <li>in A, doing "import B;"</li>
  <li>adding "package myPackage;" to both A and B</li>
  </ul>
  
  <p>Thanks!</p>