0
public class Cat {
    private Cat variable;
    private int data;

    public void methodName(int data) {
        variable.methodName(data); //I am curious about this line
    }
}

Can somebody tells me what is the name of such an invocation of a method on an instance variable or why is this possible? Sorry for all mistakes it's my first question.

0 Answers0