title: How to call groovy inner class
body: <p>This is my code, and I try to call the method in the inner class as shown below (the last line, ic = new oc.Inner()). But I get error. </p>
  
  <p>I am using groovy console, and according to groovy documentation I expect that the Inner class can be called from outer class. I am not sure about the syntax.</p>
  
  <pre><code>class Outer {    
        private String privateStr = 'some string'  
         def callInnerMethod() {        
          new Inner().methodA()            
        }      
          class Inner { 
              def methodA() { 
                  println "${privateStr}."       
              }     
         } 
  }
  
  Outer oc = new Outer()
  ic = new oc.Inner() 
  </code></pre>
  
  <p>This is what I get as result:</p>
  
  <pre><code>startup failed:
  Script1.groovy: 14: unable to resolve class oc.Inner 
   @ line 14, column 6.
     ic = new oc.Inner()
          ^
  
  1 error
  </code></pre>