Solved

import javax.swing.* V individual imports

Posted on 2007-11-23
3
204 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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 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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now