by Dinesh Thakur

Nested class is also defined as a static member in a top level class. And the nested class can be instantiated using its full name and no instance of the enclosing class is required to instantiate a top level nested class.

public class JavaNestedClass 
           {
               public void Display()
                {
                    System.out.println("This is Display of not Static Method");
                }
                    public static class NestedClass
                    {
                        private static int  i;
                        private int j;
                        public static void show()
                          {
                              System.out.println("Thi is Show of Static Method of Nestedtop ");
                          }
                              interface interfacel
                               {
                                  int Quantity =100;
                               }
                                  protected static class nest implements interfacel
                                    {
                                         private int n=Quantity;
                                         public void prn()
                                       {
                                          // int p=j;
                                          int q=i;
                                          int r=n;
                                          //Display();
                                          show();
                                       }
                                          public static void main(String args[])
                                             {
                                                   int q=i;
                                                 // int r=n;
                                                  show();
                                             }
                                   }
                            }
                      }