Play audio slide show -- Keyboard shortcut: 'x'  Back to notes -- Keyboard shortcut: 'u'              Play sound for this slide -- Keyboard shortcut: 'y'  Lecture 4 - slide 33 : 33
Program 1
 

class Outer {

  public static void method (final int par){

    final int loc = 2*par;

    class Local {
      int instVar;

      public Local (){
        instVar = par + loc;
      }

      public int methodLocal () {
        return 3 * instVar;
      }
    } // Local

    Local locInst = new Local();

    System.out.println(locInst.methodLocal());
  }

  public static void main(String[] args){
    method(5);
  }

}