
Hi, I have a class mall,how can i use this in case of inheritance.Tell me with example.

class mall { public void move(){ system.out.println("mall can move"); } } class doll extends mall{ public void move(){ system.out.println("doll can move and run"); } } here a doll is a child class and it inherits features from its parent mall note: a parent doesn't inherit from its child. a child can inherit all characteristics of a parent.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.