Java Language Packages Using Packages to create classes with the same name


Example

First Test.class:

package foo.bar

public class Test {

}

Also Test.class in another package

package foo.bar.baz

public class Test {

}

The above is fine because the two classes exist in different packages.