A nested class is a class defined inside another class. Java has four kinds — static nested, inner (non-static), local, and anonymous — each with different access to the enclosing class and different use cases.
1. Static nested class — independent of an instance
{
;
{
{
System.out.println(data);
}
}
}
Outer. .Nested();
