Answer the question
In order to leave comments, you need to log in
[Intellij IDEA] How to override a class method, having its instance?
It seems that I formulated it correctly, do not hit with slippers =)
I need to override the method in the class. There are a lot of methods, it’s difficult to do with pens (.
Here is an example of a class:
public class Example extends AbstractExample {
private AbstractExample example;
public Example(AbstractExample example) {
this.example = example;
}
void myMethod() {
int i = 1 + 1;
}
@Override
void doSomething() {
example.doSomething();
}
@Override
void doSomethingWith(Object object) {
example.doSomethingWith(object);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question