View Single Post
Old Mar 18th, 2008, 10:23 PM   #3
RainMan
Newbie
 
Join Date: Mar 2008
Posts: 7
Rep Power: 0 RainMan is on a distinguished road
Re: Importing classes

Well the reason I ask is that the book I'm learning from imports classes on a name basis i.e. javax.swing.JFrame, javax.swing.JTextField, etc. What I'm wondering is why doesn't the book just have you import the entire package. It doesn't really go into detail about why it does it that way. It just seems like it would be easier to use javax.swing.* than list 8 class names.

It does the same thing for java.awt.* going through each class of the package that it uses, rather than importing it all. Is there a benefit to listing each individual class your referencing? or is it just something it is doing so we know what it is we're referencing within the package?
__________________
Preposterous amounts of testosterone....Preposterone - powerthirst
RainMan is offline   Reply With Quote