Learn Java Programming - Packages: Import Statement Tutorial

Publicado em: 08 Agosto 2015
no canal de: Daniel Ross
1,888
11

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


Nesta página do site você pode assistir ao vídeo on-line Learn Java Programming - Packages: Import Statement Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Daniel Ross 08 Agosto 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,888 vezes e gostou 11 espectadores. Boa visualização!