class X {                                                         //(A)
    static class Y{                                               //(B)
        private int m;
        public Y( int mm ) { m = mm; }      
        public void printY(){               
            System.out.println( "m of nested class object: " + m );
        }
    }

    private Y yref;                         

    public X() { yref = new Y( 100 ); }     

    Y get_yref(){ return yref; }            
}

class Test {
    public static void main( String[] args ) {
        X x = new X();
        x.get_yref().printY();   // m of nested class object: 100 
    }
}