title: Compiler does not identify class on the same package
body: <p>I had some java classes a couple years ago, due to lack of use it all faded away. now ive been getting back into it. i was following a very simple tutorial building something using sublime (it was so simple i didn't bother on getting a proper IDE) the two files are:</p>
  
  <pre><code>package hello;
  
  public class HelloWorld {
      public static void main(String[] args) {
          Greeter greeter = new Greeter();
          System.out.println(greeter.sayHello());
          System.out.println("random alt shift");
      }
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>package hello;
  
  public class Greeter {
      public String sayHello() {
          return "Hello world!";
      }
  }
  </code></pre>
  
  <p>Greeter compiles dine but HelloWorld gives me the following error:
  <code>javac HelloWorld.java</code> </p>
  
  <pre><code>HelloWorld.java:6: error: cannot find symbol
          Greeter greeter = new Greeter();
          ^
    symbol:   class Greeter
    location: class HelloWorld
  HelloWorld.java:6: error: cannot find symbol
          Greeter greeter = new Greeter();
                                ^
    symbol:   class Greeter
    location: class HelloWorld
  2 errors
  </code></pre>
  
  <p>and if i add "import hello.Greeter;" i get:</p>
  
  <pre><code>HelloWorld.java:2: error: cannot find symbol
  import hello.Greeter;
              ^
    symbol:   class Greeter
    location: package hello
  HelloWorld.java:6: error: cannot find symbol
          Greeter greeter = new Greeter();
          ^
    symbol:   class Greeter
    location: class HelloWorld
  HelloWorld.java:6: error: cannot find symbol
          Greeter greeter = new Greeter();
                                ^
    symbol:   class Greeter
    location: class HelloWorld
  3 errors
  </code></pre>
  
  <p>On the IDE it runs fine, can anyone be so kind as to explain whats happening</p>