Answer the question
In order to leave comments, you need to log in
Why does @Override automatically appear in intellij idea?
Hello! I am taking a course for a beginner in Java, in the intellij idea editor, @Override lines appear before some methods. They appear automatically. Actually, on one method, I get an error with this line, and if I comment it out, it works. I read it on the Internet, but since I'm new to Java, I didn't really understand what kind of annotations. What are these lines and can they be removed?
Answer the question
In order to leave comments, you need to log in
Indicates that the method is being overridden. Those. stores the same input and output parameters as in the base class. If it does not compile with it, then they made a mistake with their types or number.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question