Because it is called (line 4) within the scope of the class, so it will look inside the class for a method with the same signature. That is just part of the Java language specification.
Those are just advanced Java stuff. Those knowledge aren't supposed to be put in practice. :-\"
When creating our own inner classes, why would we pick the same name for a local member when we still need to access the corresponding enclosing member? :-@
Answers
Local declarations got priority over external 1s. L-)
Truc class can freely access all sketch's members b/c it's nested inside it.
And in turn, the "sketch" is its enclosing class.
That relationship is called closure. Very famous among JavaScript coders and almost unheard of in Java.
However, if the nested class defines a member w/ the same name as an external enclosing member, the former overshadows the latter. :-B
Because it is called (line 4) within the scope of the class, so it will look inside the class for a method with the same signature. That is just part of the Java language specification.
??
Outside the class:
just put an object before it:
car.method(10);
It's a pity we cannot do that :( thx for the confirmation.
sketch_160725c.this.
: :)>-"sketch_160725c.pde":
whaouuu...tricky thing. And if I make an application I just need to call the app ?
Those are just advanced Java stuff. Those knowledge aren't supposed to be put in practice. :-\"
When creating our own inner classes, why would we pick the same name for a local member when we still need to access the corresponding enclosing member? :-@