Learn Java Programming - Local Inner Class Tutorial

Publicado el: 11 enero 2016
en el canal de: Daniel Ross
2,074
23

The local inner class is one of the four nested classes that I briefly discussed in my Introduction to Nested Classes tutorial. A local inner class, aka method-local inner class is defined inside of a method.
class Standard {
String instanceVar = "";
void methodName(String params) {
String s = "";
class LocalInner {
int i = 0;
}
}
}

The first thing to understand about a local inner class is that it can only be instantiated from within the method that it is contained in. You cannot create an instance of the class anywhere else.


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