It's kind of a style issue. I prefer to explicitly import each class. That way I can see all of the dependencies right at the top of the file.
You will find that most good coding tools (IDE's and text editors with language specific plugins, a la Netbeans and jEdit) will allow you to use either style.
Originally posted by Philip Shanks:
No, using "splat" style imports does not increase the size of your application. The imports simply tell the ClassLoader in which packages it can find the classes the code needs to access.
I agree. Importing a package totally neither slows down your application nor it makes it bigger. Any way, the class files are loaded as and when they are required (meaning when they are used in the program). I also prefer a specific import of a particular class rather than a entire package as it is easy for maintenance and better readability.
Originally posted by Natraj Gudla:
Importing any number of packages though unused,just increases the compile time only , nothing else.It does not effect your binary size or the performance(execution time).
Compilation time is not affected here as the classes are loaded onto memory as and when they are used in the program. And as you rightly said, it does not affect the performance any way.