class X {                                                           

    public static class Y{                                        //(A)
        private int m;
        public Y( int mm ) { m = mm; }                              
        public void printY(){                                       
            System.out.println( "m of nested class obj: " + 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 obj: 100

        X.Y y = new X.Y( 200 );                                   //(B)
        y.printY();             // m of nested class obj: 200
    }
}