Let's illustrate this with an example. Here we have a class A
that contains a usual non- static attribute 'i',
and a class attribute, a static attribute 'j',
a usual non-static instance method "methode1",
and a static method, "methode2", which is a class method.
In the usual method, "methode1",
we try to access the 'i' attribute, which isn't problematic.
A method linked here to an instance can access
both the instance attributes
and the 'j' class-attribute.
We can access the two.
Of course, we're allowed to call "methode2",
which is a class method, in "methode1".
So everything is permitted in an instance method.
But in a class method,
we can only access the attributes and the class methods.
If we try doing the same thing than in "methode1",
and accessing the instance attribute 'i',
then we'll get a compilation error.
We aren't allowed to do this because we are in a class method.
We can't guarantee the existence of an attribute,
of an object, of the A class.
But we can access the static attribute 'j',
'j' is a class attribute, a static attribute.
We are allowed to do this.
We aren't allowed either in "methode2", static method,
to call a non-static method, "methode1",
so this would also generate a compilor error.
On the other hand, we can absolutely call static methods,
including themselves.
This call is syntactically correct, there's no problem with it.
So of course, here, as we've called the same method,
we should be careful and take precautions
so that it doesn't end up with an infinite recursion,
and protect this call with a break condition.
But that is bringing us a bit to far, we only wanted to show, here,
that we can call another static method
in a static method.
Of course, if we create an instance like this in a static method,
we can absolutely create an instance like this in a static method,
so of course we can here call
"methode1" on the 'v' instance of the A class.