dev@glassfish.java.net

Re: java.* - import first or last?

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Thu, 09 Dec 2010 01:20:56 -0800

Well, Byron, I already know you and I think exactly the opposite about
these things; you put the fields at the end of the class instead of the
top where they belong! :-)

Byron Nevins wrote on 12/09/2010 12:34 AM:
> I'm with Sahoo on this one. The specifics come first. The other way around makes
> no sense to me. My analogy would be catching Exception AFTER catching
> RuntimeException (in which case you HAVE to do the more specific first).
>
>
>
> On 12/8/2010 10:29 PM, Sahoo wrote:
>> One can't import p1.C and p2.C at the same time. If one imports p1.* and p2.C,
>> then p2.C always wins irrespective of the order. So, what's the real issue?
>>
>> I am one of those who import java.* at the end, because I like to see
>> non-standard dependencies ahead of standard ones. I may not have done that
>> consistently though.
>>
>> Sahoo
>>
>> On Thursday 09 December 2010 11:43 AM, Bill Shannon wrote:
>>> I always include imports of java.* classes first. If there's any sort of
>>> naming conflict, I want the standard classes, not the product-specific
>>> classes of the same name. If I see "List", I really don't want to wonder
>>> whether it's java.util.List or some other List.
>>>
>>> But I see a bunch of code that imports the java.* classes last.
>>>
>>> Why?
>>
>