An import statement is completely unnecessary. You can go all your life as a Java developer without writing if you want; it just means that you will be forced to enter the fully qualified class name for each class in your application.
All import allows you to use the short class name in your code instead of the full one (for example, Connection instead of java.sql.Connection ).
If your class has two packages that contain the same short class name, you will have to type both of them all the time to eliminate all ambiguity (e.g. java.sql.Date and java.util.Date ).
Do not confuse import with class loading. This does not affect performance at runtime; this only affects the number of keystrokes that you must enter during development.
source share