I have two classes Hello1 and Hello, and I'm calling class Hello1 constructor within Hello class, but when I trying to compile the Hello class with command
javac Hello.java
I'm getting compile time error:
Hello.java:6:cannot find the symbol
symbol: class Hello1
location: class Hello
Hello1=new Hello();
^
Hello.java:6:cannot find the symbol
symbol: class Hello1
location: class Hello
Hello1=new Hello();
^
But when I try to compile the compile the class with command:
javac Hello.java Hello1.java
it's working fine, but why I have to use this command every time to compile the class? Why the compiler can't use the already compiled .class Hello1 file, so that next time I use the command javac Hello.java.