File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes imports Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "imports" Watch "imports" New topic
Author

imports

Arvind Chavar
Ranch Hand

Joined: May 16, 2001
Posts: 53
Does wildcard imports of packages place any performance penalties as compared to only importing required classes?
Arvind
Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
I don't believe so. They are all aliases.
-Dale


By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
Dale is correct.
import statements have no affect what so ever on performance.
u can put as many as u want including as many wildcards as u want and it wont affect it one bit.
import staments only help us typing out the name of the class instead of the FULL name inlcuding the package.
however, u should note that using wildcards is not recommended for a diffrent reason: it may cause class name clashes in your pgram and make it sometimes harder to understand.
Arvind Chavar
Ranch Hand

Joined: May 16, 2001
Posts: 53
Dale and Roy ,Thanks!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: imports
 
Similar Threads
ArrayList
JBuilder and required projects
Why these imports in AdviceClient class?
Implementing scanner into a simple login page
Please help - Need advice