Possible Duplicate:
Java import confusion
When i read play frameworks documentation, I found this.
import play.*;
import play.mvc.*;
In the first line itself they have imported all the classes under play package. Then what is the use of second line. Check this link. Go to ‘Providing an application error page’ section.
Correct me if i’m wrong in imports concept.
You are.
Something like this:
only imports types from the
foo.barpackage. It doesn’t import from “subpackages” such asfoo.bar.baz.It’s very easy to test this:
That won’t compile, but if you add:
then it will.
Java doesn’t really think of packages as forming a hierarchy. We do, as humans, but as far as the Java language is concerned, the packages
java.utilandjava.util.regexare entirely unrelated.