sumedha rao wrote:...or else the child should import the parent package otherwise the compilation would fail.
Do you see any difference here? You import things to avoid writing the fully qualified names in the code (and some other advantages too). This would give
no compiler error if the class path is set to the
Parent when the
Child is compiled since the fully qualified name is used for the
Parent class. Best thing is to try it yourself...