I have a funny inheritance problem here, which I could not understand why.
I put two
java files in the "same folder", one extends the other.
The first one is:
public class New0 extends Object{}
I compiled it, no problem.
The second one is:
public class New1 extends New0{}
Now, I got error message when I try to compile this one.
The error message shows:
C:\com\cancal\New1.java:2: cannot resolve symbol
symbol : class New0
location: class New1
public class New1 extends New0
^
1 error
Tool completed with exit code 1
Why the second java file cannot recoganize the first class file?They are in the same folder and they are both public. I tried to put "package com.cancal;" in each file, but still does not work
Looking for help.
Thanks