error with inner class object
<pre><code>import java.io.*;
class YY
{

   int a=0;
   void putValue(int m)
   {
        a=m;
    inner x=new inner();
        x.display();
   }
   class inner
   {
    void display()
        {
       System.out.println("value of a:"+a);
        }
   }
}

class InnerYY
{
   public static void main(String args[])
   {
    YY ob=new YY();
    ob.putValue(90);
    YY.inner i = new YY.inner();
    i.display();
   }
}
</code></pre>

<p>while running this program i'm getting the following error...</p>

<p>InnerYY.java:27: an enclosing instance that contains YY.inner is required
        YY.inner i = new YY.inner();
                     ^
1 error</p>
