File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

importing unnecessary classes

 
Lucas Franceschi
Ranch Hand
Posts: 106
Mac Mac OS X Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
importing unnecessary classes, does it makes my program run slowly or use more memory?

i mean, is it any bad to import classes that i don't use?
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It has no impact at runtime, it's just a compile-time convenience.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12024
25
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import statement are not like c-style 'includes'. They are kind of like a PATH variable for the file. they tell the compiler "if you can't figure out what the 'Person' class is, try looking for it in the 'org.mycompany.people' package" - and since package structures are basically a list of directories...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic