posted 16 years ago
code:
package a;
public class Father{
//some code...
}
-------------------------------------------------------------------------
package b;
import a.Father
class Son extends Father{
Father a= new Father(); // compiler good.
}
---------------------------------------------------------------------
However if son class like this
package b;
class Son extends a.Father{
Father a= new Father(); // compiler error!
}
So, what's the difference between these two son class. I tried if not use import, just extends a.Father can inheriate the public methods from father class just like use "import"
But why canont get a object of Father?