I have 2 java files in mypack that have package mypack;
i have a third java file that tries to import them
when i use import mypack.*; it doesnt work
when i use import mypack.Package1; import mypack.Package2; it works
I tried including more of the file path, but this wasn’t included in the package statement so I did not have much hope that it would solve the issue and it did not. I can still only import each file of the package individually.
cannot access Package2
bad source file: Package2.java
file does not contain class Package2
NimbusDev57 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3