Learn Java Programming - Static Nested Classes Tutorial

Publicado el: 13 enero 2016
en el canal de: Daniel Ross
5,134
64

The static nested class is one of the four nested classes that I briefly discussed in my Introduction to Nested Classes tutorial. A static nested class is defined at the member level and must have the keyword static in the declaration.
class Standard {
String s = "";
static class StaticNested {
int i = 0;
}
}
The first thing to understand about an nested static class is that you do not need an instance of either the outer class or the nested static class in order to access its members. You can directly access static methods and variables without creating an object. If you would like to create an instance of a nested static class you do not need an instance of the outer class in order to do so.


En esta página del sitio puede ver el video en línea Learn Java Programming - Static Nested Classes Tutorial de Duración hora minuto segunda en buena calidad , que subió el usuario Daniel Ross 13 enero 2016, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 5,134 veces y le gustó 64 a los espectadores. Disfruta viendo!