what are merits and demerits of overriding in java

These questions are starting to sound like assignment questions...

Builder_1:
DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/community/rules

Post what you have got so far and someone will help you with any detailed questions you may have.

PLEASE tell if someone has some idea as overridding is basically a concept of inheritance which basically refers to different implementations of the same method in the hierarchy.so what could be the demerits??

Well, what happens if your expecting a function to do something in particular? How would overriding effect that?