unable to access the generic's variable from its class in java
<pre><code>class example{ 
    private int x=1;
    public int xreturned(){
    return x;
   }
}
class example2&lt;N&gt;{
    example2&lt;N&gt; variable;
    public int fun(){
        int x=variable.xreturned(); 
    }
}
class mainclass{
    public static void main(String[] args){
       example2&lt;example&gt;obj=new example2&lt;example&gt;();
       if(1.equals(obj.fun()))
       System.out.println("correct");
       return 0;
   }
}
</code></pre>

<p>at the example2 class in fun function variable cannot find the xreturned() function of class example, how can i make it find it?. Now you may ask me how should it find it? im thinking for being possible to find it as obj has the example (type of example class) generic.. so please tell me how to make it find it with the minimum changes</p>
