I demonstrated in my Packages Part 1 Tutorial that we could access a class from another package using its fully qualified name. However, it would get really old really fast if we had to type in the fully qualified name every time we used a class or its members from another package. The import statement comes to rescue! The import statement must reside after the package statement and before the class declaration. You can use the import statement in a couple of different ways. The structure for the statement looks like this:
(import) (package.ClassName) (;)
(import) (package.*) (;) // wildcard * imports all available classes
On this page of the site you can watch the video online Learn Java Programming - Packages: Import Statement Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Daniel Ross 08 August 2015, share the link with friends and acquaintances, this video has already been watched 1,888 times on youtube and it was liked by 11 viewers. Enjoy your viewing!