very good community my question is the following. I would like to know why I can call a method of a superclass in my subclass without creating an object of this type and in addition to not being static.
is what happens below, I use an inherited method in the subclass constructor but the way that method is called and how it works inside the constructor causes me some anxiety. If someone knows the answer, it would help me a lot.
thanks in advance.
class ClasePrueba{
public void MetodoProbando(){
int x = 5;
int y = 5;
int resultado = x + y;
System.out.println(resultado);
}
class ClaseDos extends ClasePrueba{
public ClaseDos(){
MetodoProbando();
}
}
}