First of all you have to create an object of X class (outer class) and then use objX.new InnerClass() syntax to create an object of Y class.
Try,
X x=new X();
X.Y y=x.new Y();
First of all you have to create an object of X class (outer class) and then use objX.new InnerClass() syntax to create an object of Y class.
Try,
X x=new X();
X.Y y=x.new Y();