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.
boardtcAsked:
Who is Participating?
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.