A nested class એ એક વર્ગ છે જે અન્ય વર્ગમાં વ્યાખ્યાયિત કરવામાં આવે છે. જાવામાં ચાર પ્રકાર છે — static nested, inner (non-static), local, અને anonymous — જેમાંના દરેક પાસે enclosing class ને અલગ અલગ access અને અલગ અલગ use cases છે.
1. Static nested class — instance થી સ્વતંત્ર
{
;
{
{
System.out.println(data);
}
}
}
Outer. .Nested();
