Payal,
Thats what private's do!! They are soo picky

Well let see,
In the eariler case you had modifiers for both the write() methods as friendly/coderanch. So during Dynamic Invocation, write()from subclass gets called satisfying the polymorphic effect.
But
When you make the parent write() private, dynamic invocation
fails because privates are very personal, and they would not share it with anybody else, even to their subclasses and these two write()methods become independent of each other. As as result, write() from parent gets called, since
you had used parent's class reference in the first place
To put it in a nut shell:
private methods behaviour is closely similar to static when it comes to overriding.
Thankyou