André Asantos wrote:lista.add(this.setNomeAnimalDomestico("Cachorro"));
Return type of setNomeAnimalDomestico method is void - means it doesn't return anything. The above statement attempts to get a return value from setNomeAnimalDomestico method and pass it to lista.add method.
Please CarefullyChooseOneForum when you ask a question
This forum is for posting sun certification results, moving this to the SCJP forum.