New course! Every coder should learn Generative AI!
Try a free lesson0
Does it work??
Just as : Animal a=new Animal(); ((Cat)a).makesound(); Does it work??
1 Answer
0
set animal as variable, ok, then u have sound method... you need a sound for it to play because computers dont know what animal sounds are... but it looks like a good code, try it maybe its bound to do something.