Your classes have packages, which are mirrored in the directory structure. E.g. com/company/pk/Foo
and com/company/Bar
- then you can reference them using the import
statement. If your classes are in different directories but don't declare a package
, then you are doing it wrong.
Read about packages