Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: blmblm@myrealbox.com Newsgroups: comp.lang.java.programmer Subject: Re: A question about some long java code that has getters/setters Date: 23 Jul 2011 17:41:03 GMT Organization: None Lines: 27 Message-ID: <990fdfF8n9U3@mid.individual.net> References: <1672e2f1-a963-4fcf-b651-41b69432c9d7@p29g2000pre.googlegroups.com> X-Trace: individual.net KBPJvvFwSMo7Oq0xgA4eMgv4rN+7Un014ox9UxRd4vFVFP5QLM X-Orig-Path: not-for-mail Cancel-Lock: sha1:Z+kw6ixfetDXfVHm59qHxa+21lE= X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6471 In article <1672e2f1-a963-4fcf-b651-41b69432c9d7@p29g2000pre.googlegroups.com>, lewbloch wrote: > Chad wrote: > > The following code, which is taken from one of my school books, > > displays 4 different boxes inside a gui [sic] > > > > import java.awt.*; > > import javax.swing.*; [ snip ] > It's also bad practice to use import-on-demand (import '*') rather > than single-type imports. In code meant for compiling and execution, agreed. In code meant for display in dead-tree documentation, though .... I think there's a case to be made for the "import ...*" form, so that code examples aren't so full of uninteresting lines, accompanied by an explanation somewhere that in "real" code one would import only those classes needed. (By the way -- are you the person who used to post using the address noone@lewscanon.com, or a different Lew?) -- B. L. Massingill ObDisclaimer: I don't speak for my employers; they return the favor.