Aaahhh, there's no "static" keyword in the import. Forget about the previous post.
It allows you to import inner classes. Check this.
Joined: Jun 28, 2007
Christophe Verré wrote:From Java 5, you can import static variables from a class that way. It means "Import all static variables from the Date class". It would have been an error in Java 1.4.
i know that import static java.package1.class1.*; is a valid statement, but what about if a class is not having any static fields then import java.package1.class1.*;
works fine? is it won't give any compile time errors? please clarify