Possible Duplicate:
Import package.* vs import package.SpecificType
while importing packages in java does it matter if I import all classes or is it better to use specific imports.
For example is it better to use import java.util.*
or to import the specific class of the util package which my program uses.
It makes no difference at all at execution time. The compiled code will be identical – and it will also be identical to the equivalent code with no imports, but every type name specified in full at every point in the code.
It will almost certainly make no significant difference at compile time either.
Personally I use a wildcard import when writing throwaway code by hand (e.g. for samples on Stack Overflow) but get Eclipse to import specific classes when writing real code.