Question of Basic Esthetics

Sorry, I’m not sure where else to post this…

What’s better style/efficiency?

import javax.swing.*;

or…

import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JScrollPane;
import javax.swing.JPanel;

My understanding is that efficiency is not a concern as it is just a matter of package scope that you are giving your class. In general for style I use the all inclusive *after importing 2 classes from a package if there isn’t a reason to do otherwise. There could be reasons to import single classes if the package is a little convoluted I suppose.

My understanding is that when your classes are compiled they only import the stuff you use anyways, so I don’t think it really matters unless you want to remember what exactly you are doing in the current class…

Great,

Thanks for the info!

Another question. Is there a JRE 1.5 for macs?

FWIW, imports are not actually instructions. All they are is a bit of syntactical sugar that the compiler recognizes so that programmers don’t have to type stuff like “java.lang.String”. Many users with a C/C++ background (coughespecially the GNU and their lawyerscough) fail to understand this simple point because they are used to the way includes work.

[quote] Another question. Is there a JRE 1.5 for macs?
[/quote]
OS X 10.4, due out any day now. (It’s in beta right now.) No word on whether Apple will do a port for previous OS X versions.