title: Error - Class interface or enum expected
body: <p>I am new to java and i am writing this code in notepad which is giving me errors.In netbeans although package is already defined.How to do this in notepad?</p>
  
  <pre><code>package A;
  class A {
      private String name;
      protected String company="oracle";  
      A(String name) {
          this.name = name;
          System.out.println(name);
      }
  }
  
  public class B extends A {
      // A public class constant
      public final static String st = "Public access modifiers";
  
      B(String name) {
          super(name);
      }
      void getCompany()
      {
          System.out.println(company);
      }
  
  }
  
  package B;//getting class interface or enum expected 
  public class Application {
      public static void main(String[] args) {
          System.out.println(st);
          B b=new B("Java");
          b.getCompany();
      }
  }
  </code></pre>