New course! Every coder should learn Generative AI!
Try a free lesson+ 2
What might the problem with this code? It's outputs nothing.
1 Answer
+ 18
There is a syntax error in the Cat class. The body of the play() method has 2 closing brackets instead of 1. Delete one } and everything works.