Community
Participate
Working Groups
Let's have 2 imports of the same class: import com.somecompany.SomeClass.*; import static com.somecompany.SomeClass.*; public class Test { public void test() { staticMethodFromSomeClass(); // eclipse reports error, javac doesn't } } If you reorder imports (or remove nonstatic one) it will work ok: import static com.somecompany.SomeClass.*; import com.somecompany.SomeClass.*; // obsolete import
The first import is incorrect. It should be: import com.somecompany.*; It should not be possible to use such an import if the import is not static.
Added StaticImport test 15
Verified in 200412140800