S
S
Senseich2019-02-01 22:07:26
IntelliJ IDEA
Senseich, 2019-02-01 22:07:26

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

1 answer(s)
V
Vasily Melnikov, 2019-03-06
@BacCM

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 question

Ask a Question

731 491 924 answers to any question