title: In a local class, how to reference shadowed variables of enclosing method?
body: <p>I am thinking about this situation while learning <a href="http://docs.oracle.com/javase/tutorial/java/javaOO/localclasses.html" rel="nofollow">local classes</a> from Oracle's tutorial:</p>
  
  <pre><code>class HelloWorldApp {
      public String s = "string in outer class";
      public void shout() {
          final String s = "string in enclosing method";
          class out {
              public String s  = "string in local class";
              public void show()
              {
                  System.out.println(s);
                  System.out.println(HelloWorldApp.this.s);//reference the member of enclosing class
                  System.out.println(HelloWorldApp.this.shout.s)//compiler complaints
              }
          }
          out no = new out();
          no.show();
      }
      public static void main(String[] args) {
          HelloWorldApp h = new HelloWorldApp();
          h.shout();
      }
  }
  </code></pre>
  
  <p>Now, I'd like to reference the local variable <code>s</code> of method <code>shout()</code> in this case, but the tutorial didn't give out the point. </p>
  
  <p>I have searched by Google and  StackOverflow, but I couldn't get the right way out.</p>