Hello,
I have a question, I don't understand why IntelliJ doesn't work when I compile the solution:
What does it mean? How can I 'create' a java object called 'Cat'? Where?
Thank you very much
Problem in IntelliJ
En discusión
Comentarios (1)
- Populares
- Nuevas
- Antiguas
Debes iniciar sesión para dejar un comentario
Thomas
22 agosto 2023, 10:47
You mixed Main and Cat class. The Main class has a Cat constructor. That is not allowed. The fight method should also be inside the Cat class as its purpose seems to be to compare this cat with another cat. But inside the Main class this is an object of the type Main (of course).
If that's not enough help then you should post code instead of a screenshot. That is always preferred.
+1