Put the keyword MY in there and it works. It did for me. CatMycat = newCat();