I have created a folder/package. two subpackages (first one=subpkg1 and second one=subpkg2) a file inisde subpkg1and import file from subpkg2. and
enter image description hereI am using VS code for learning java. I have created a folder/package(name=pkg). then i created two packages (first one=subpkg1 and second one=subpkg2)inisde the package. but i created a file(test1)inisde subpkg1and import file (name= food)from subpkg2. and compile and run. then get the error that pkg.subpkg2 doesn’texist (see the image)