Are methods declared in .pde files implicitly public?

Was typing a toString method without public modifier, didn’t get an error.

That made me wonder if all methods were implicitly public or only the classic override methods of Object for convenience.

Inside “.pde” files, the PDE’s pre-processor adds the keyword public on every method & field that doesn’t have its own keyword accessor (public, protected & private). :face_with_monocle:

Although it fails to do that on members of anonymous instantiations inside functions. :male_detective:

1 Like