We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Quick question on clarification. In the examples of using objects, objects are always declared using "class" and not "static class". However, if you declare an object without the "static" keyword, you cannot define any class variables or methods. If you do use the "static" keyword, the behaviour of the object does not appear to change, however you can declare object variables and methods.
So, my question is, why not always use the "static" keyword to declare classes? Is there an optimisation loss in using it? It seems to just add the ability to use object variables and methods.
Answers
new
.static
keyword.static
already.static
, they're also called inner.static
, that class is restricted to access PApplet'sstatic
members only.static
nested class behaves pretty much like top classes.static
nested class needs to request a PApplet reference in order to access its non-static
members as well.Thanks! That information is not really evident from the references.