void setup()
{
size(800, 800);
foo();
}
void foo()
{
class Gah
{
int a, b;
public String toString() { return a + " " + b; }
}
Gah g = new Gah();
g.a = 1;
g.a = 2;
println(g);
}
I never had to use this capability in my code... Perhaps to make an anonymous class less anonymous but still limiting its scope?
Answers
Keyword
void
declares that a method doesn't return anything.Methods live inside classes.
I never had to use this capability in my code... Perhaps to make an anonymous class less anonymous but still limiting its scope?
Arf! Forgot about anonymous class! Generally, I like to create a field to store it! :-\"