posted 10 years ago
In the second case the compiler will assume that whenever you refer to "Date" throughout your code, you mean java.sql.Date because that's the one you explicitly imported.
In the first case it gets confused because you're explicitly importing both.
The usual workaround is to import explicitly one of them (maybe the one that's used more often), and refer to the other always by its fully qualified class name.