0
Why it show no output
1 Answer
+ 2
You have too many closing braces. 1 at the Dog class, 2 at the Cat class.
And you need the public keyword for the methods of Cat.
Try using code editors that will help you with formatting and highlighting paired brace. They also help in many other aspects of coding.