Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

import javax.swing.* V individual imports

Posted on 2007-11-23
3
Medium Priority
?
213 Views
Last Modified: 2010-03-30
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
Comment
Question by:boardtc
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 160 total points
ID: 20337830
No, but it's bad practice for readability reasons
0
 
LVL 4

Assisted Solution

by:jcoombes
jcoombes earned 160 total points
ID: 20337861
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 20338263
:-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question