Using * in a package statement doesn't work.
You can use * in import statements, but often it is better to import classes explicitly one by one, instead of importing everything in a package with *. That's because using import with * can make your program not compile anymore with a future version of
Java (or a future version of a third-party library you're importing).
If, in a future version, a class is added to a package that you're importing with "import somepackage.*;" and that new class happens to have the same name as another class that you're using in the same source file, then the compiler suddenly has two classes that have the same (non-qualified) name, and your program won't compile anymore.
When you import only the classes that you really need from 'somepackage', you won't automatically import new classes from 'somepackage' when a new version of that package is used and you won't have a name clash problem.