Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

import javax.swing.* V individual imports

Posted on 2007-11-23
3
Medium Priority
?
211 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:tomcorcoran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

721 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