John Jai wrote:You have to consider the package structure when you compile and run.
So alternative way (or the correct one) is to compile like below -
Where food directory is present under C:/test
Yes, this is preferred way when you compile particular file.
and john mean while we can do using *.java if you go to the root package/food . I am curious to know the behind the sense of *.java even here also compiler have to do linking right?
Joined: May 31, 2011
The listing for "Compiling multiple source files" here just tells that the wildcard option compiles all source files in the specified directory. I just copied the two source files in a different directory (not the directory 'food' with package name) but still was able to successfully compile them using * option.
subject: cannot find symbol -the subclass and supercalss are in the same directory