# Are methods declared in .pde files implicitly public?

**URL:** <https://discourse.processing.org/t/are-methods-declared-in-pde-files-implicitly-public/10604>\
**Category:** Processing\
**Created:** [April 24, 2019, 8:04pm UTC](https://discourse.processing.org/t/are-methods-declared-in-pde-files-implicitly-public/10604 "2019-04-24T20:04:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoliProcessor](https://avatars.discourse-cdn.com/v4/letter/l/6a8cbe/32.png) [@LoliProcessor](https://discourse.processing.org/u/LoliProcessor)\
**Post date:** [April 24, 2019, 8:04pm UTC](https://discourse.processing.org/t/are-methods-declared-in-pde-files-implicitly-public/10604/1 "2019-04-24T20:04:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [April 24, 2019, 8:46pm UTC](https://discourse.processing.org/t/are-methods-declared-in-pde-files-implicitly-public/10604/2 "2019-04-24T20:46:29Z")

</div>

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`). 🧐

Although it fails to do that on members of anonymous instantiations inside functions. 🕵️‍♂️
