Clase estática anidada de Java
Class Animal {
static class Mammal {
// static and non-static members of Mammal
}
// members of Animal
}
SAMER SAEID
Class Animal {
static class Mammal {
// static and non-static members of Mammal
}
// members of Animal
}
A regular nested class cannot access members of its outer class. But a nested class marked as an inner class can.
OuterClass.NestedClass obj = new OuterClass.NestedClass();