I was wondering if there are any performance or class 'bloat' issues associated with using the import of package.* versus including only the classes which you are using?
posted 14 years ago
I think that importing more classes than you need has no effect on run-time performance. The import statement affects which classes should be made available by class name only, so that they may be referenced in the source without their package prefix, during compilation. However, this does not affect which files get loaded, or how much memory gets used when running. I do not know whether the compiler goes slower, faster or about the same speed if import packagexxx.* is used, compared to individual imports. However, for clarity and to avoid namespace clashes (class with same name in two packages -> confusion), I think that developers should always explicitly import individual classes, even if it makes for a rather long prolog to the source file.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.