*
The moose likes Java in General and the fly likes Is there any difference in package importing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Is there any difference in package importing?" Watch "Is there any difference in package importing?" New topic
Author

Is there any difference in package importing?

saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
I have one simple doubt regarding performance
import java.util.Date;
import java.util.*;
I use Date class in my program so i generally use this java.util.*;
to import the class.
but in most of the programs who has developed in my company use this
java.util.Date;
I think by using the above one we can improve the performance by reducing the extra overhead.. by importing all the classes


am i right??

cinux


A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
There is absolutely no difference in the performance during runtime. There might be a very very small difference during compilation time, but that difference is ofcourse - very very small


Mani
Quaerendo Invenietis
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
The same topic is discussed here too and a good explanation is available
http://www.coderanch.com/t/401957/java/java/import-statements-more-memory-than


http://www.skillassert.com


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there any difference in package importing?