posted 1 year ago
The import example means that there are two things, both named "Date". By using the import statement you can use only "Date" when declaring a field instead of "java.util.Date" or "java.sql.Date". Just a shorter form. If there are two things with the same name the compiler cannot know which one you want to use. By using "java.util.Date date1" and "java.sql.Date date2" the compiler knows which one to use.