3 Replies Latest reply: Jan 6, 2010 12:16 PM by 843810 RSS

    How to compile a dependent file without others

    843810
      /***********File a.java*************/
      class a
      {
      public static void main(String args[])
      {
      b obj=new b();
      b.foo();
      }
      }

      /**********File b.java***************/
      class b
      {
      pubic void foo()
      {
      System.out.println("this is foo.");
      }
      }

      Question:
      What changes i should do to compile a.java if b.java does not exist at compile time.
      Any help would be appreciated.