Solved

import javax.swing.* V individual imports

Posted on 2007-11-23
3
206 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
  • 2
3 Comments
 
LVL 86

Accepted Solution

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

Assisted Solution

by:jcoombes
jcoombes earned 40 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 84
java 8 lambda expresssions exception handling 3 90
Java Loop 6 61
Should localization be done inside spring controller 5 25
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

773 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