dev@glassfish.java.net

Re: java.* - import first or last?

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Wed, 08 Dec 2010 22:50:31 -0800

Sahoo wrote on 12/08/2010 10:29 PM:
> 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 often import java.util.* or java.io.* because really, don't you just want
to be able to use all of it whenever you want? (Ok, I know some people
believe religiously that you should never use "*" in an import; I don't want
to get into that here.)

> 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.

Did you also "#include <stdio.h>" last? :-)