Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

import javax.swing.* V individual imports

Is there an overhead to just doing import javax.swing.* rather than (in Eclipse) pressing Ctrl+Shift+M to add imports as necessary?

Thanks,

Tom.
0
boardtc
Asked:
boardtc
  • 2
2 Solutions
 
CEHJCommented:
No, but it's bad practice for readability reasons
0
 
jcoombesCommented:
Also, you may have classes that have the same name (unlikely but can happen) from different packages, so if you explicitly import the classes you need, then it's easier to differentiate between such classes.   Also, if you import an entire package then it can lead to compilation errors if such a collision occurs....

JC
0
 
CEHJCommented:
:-)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now