For example I have a file Example.java in which there is the following code:
class Example { ... }
And, in another file ExamplePublic.java I have:
public class ExamplePublic { ... }
So, there is no package definition. In this case the classes are in the "unnamed package".
What I want to understand is if in this case the behavior is the same as if the package is specified: the Example class has the "package-private" (default) visibility (in the unnamed package), whereas the ExamplePublic class is accessible from all other packages (because it is public).
Or does anything change for the default package?
Thank you.