Source Code : A named inner class is used to

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

A named inner class is used to

  
/** Demonstrate inner-inner class. A named inner class
 * is used to show that it can access non-local variables
 * in the enclosing object.
 */
public class InnerClass3 {
  static String msg = "Hello";

  public static void main(String[] av) {
    class Inner {
      public void doTheWork() {
        // print member of enclosing class
        System.out.println(msg);
      }
    }
    Inner p = new Inner();
    p.doTheWork();
  }

}


           
         
    
  

Thank with us