Java "static import" vs. "import static" in Java 8
This should not compile.
static import java.lang.System.out;
According to the JLS, a single static import should look like this:
import static java.lang.System.out;
All forms of the Java import statement start with the import
keyword, and I don't think there is any other context (i.e. apart from an import statement) in which the import
keyword can be used.
Note: the import
and static
keywords are not modifiers in this context, so the "modifiers can be supplied in any order" meta-rule does not apply here.
In short, either your compiler / IDE is broken or confused ... or what you are looking at is not real Java source code.