I've got an enum MyEnum in the default package, and I'm trying to import its instances in another file:
The result is a compiler error: The import MyEnum cannot be resolved. When I put MyEnum in a package, it works flawlessly.
I've googled a little on the subject and apparently, this is expected behaviour. Static import of something in the default package was possible in previous versions of
Java, but for some reason Sun decided to disallow it. My question: why?
Yes, I normally put all of my classes in packages, I just want to understand the reasoning behind this decision.