title: How can I access static inner class method using object of outer non static class?
body: <p>How can I access static inner class method using object of outer non static class ?</p>
  
  <pre><code>package outer_inner;
  
  public class Outer {
  
  private String s = "Hello";
  
  public void hello() {
  System.out.println(s);
  }
  
  public static class Inner {
  
  private String name = "World";
  
  public void getName() {
  System.out.println(name);
  }
  
  }
  }
  </code></pre>
  
  <p>I want to access in the below class. how can i do this?</p>
  
  <pre><code>package outer_inner;
  
  public class TestOuter {
  
  public static void main(String[] args) {
  // TODO Auto-generated method stub
  Outer o = new Outer();
  
  
  Outer.Inner nobj = new Outer.Inner();
  
  }
  </code></pre>