new ppp().new B() ( //line 4 ) . Will this create an instance of B alone or ppp too ?
Class B is an inner class. When you create an instance of B, it requires an instance of Outer class here ppp, so both objects will be created. writing simply new B() in main method is wrong.
Naseem