This discussion is archived
3 Replies Latest reply: Jan 6, 2010 10:16 AM by 843810 RSS

How to compile a dependent file without others

843810 Newbie
Currently Being Moderated
/***********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.