Learn Java Programming - Packages: Import Statement Tutorial

Publicado el: 08 agosto 2015
en el 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


En esta página del sitio puede ver el video en línea Learn Java Programming - Packages: Import Statement Tutorial de Duración hora minuto segunda en buena calidad , que subió el usuario Daniel Ross 08 agosto 2015, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,888 veces y le gustó 11 a los espectadores. Disfruta viendo!