So I have two java files (with one public class in each) inside the same package saved in the same folder. The folder hierarchy reflects the package name. Now, inside one of the classes, I would like to call a method from the other class. As far as I am concerned, this can be done by calling: So I have two java files (with one public class