Suppose you had imported. import java.util.*; import java.sql.*;
And now what happen if you try to make a object of Date Class? The Compile will confuse, which Date class to be used to create a Object either from util or sql. At that time you can tell compiler implicitly the name of Class. like This, static import java.util.Date; import java.sql.*;
I hope I am making my self Clear.
===================================== Pankaj Patel Enjoy(ing) The World Of Programming... ===================================== [ March 23, 2007: Message edited by: Pankaj Patel ]
We are still required to mention the class name, and this is where the new feature of static import comes in. JDK 1.5 adds the ability to import the static members from a class, or the enum values from an enum type. It is analogous to the ordinary import statement, and it looks like this:
import static qualified_class_name.*;
SADASIVAKUMAR UTTI, SCJP1.4
A bend in the road is not the end of the road ... unless you fail to make the turn.