title: Two java files, in same directory, one accessing the others class/s?
body: <p>I am trying to grant one <code>.java</code> file access to the class in another <code>.java</code> file. I would like to do this on the command line. For example how would I do this using the two files below?</p>
  
  <p>File: "ToImport.java"</p>
  
  <pre><code>package ABC;
  public class ToImport {
      private String aName;
      public ToImport(String Name)  {
          aName = Name;
      }
      public String toString() {
          return("Text: " + aName);
      }
  }
  </code></pre>
  
  <p>File: "TheImport.java"</p>
  
  <pre><code>package ABC;
  public class TheImport {
          public static void main(String[] args) {
          ToImport abc = new ToImport("a");
          System.out.println("TEST: " + abc);
      }
  }
  </code></pre>
  
  <p>When I type <code>javac ToImport.java</code> I get no errors but when I type <code>javac TheImport.java</code> I get the following error,</p>
  
  <p><img src="https://i.stack.imgur.com/TezSZ.png" alt="Command Prompt Error Message"></p>