Why is Java import static brain dead?

By Angsuman Chakraborty, Gaea News Network
Friday, August 29, 2008

Let’s begin with an example. Assume a class MQ is in the package  com.taragana.mq. The utlitiy class Util also belongs to the same package. I can import Util from MQ like this:

import Util;

In fact I don’t even need to import it because it is in the same package. However it appears that I cannot import static Util like this:

import static Util;
Note: The error is “cannot find symbol”

However I can do this:

import static com.taragana.mq.Util.*;

Why does import static have to be so brain dead? Any explanations?

PS. No puns please.

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :