1) You can nest classes.
I think you cannot declare a nested class with same name as the parent class.
So my guess is that you named your sketch "Fish". It was safe in older versions of Processing, but no longer. I was bitten by something similar when I made, for example, a sketch named PImage to test the PImage class: I had a conflict I had hard time to figure out.
What you need to know is that behind the scene, Processing creates a full Java class whose name is the sketch name. So you might end having a Fish class inside a Fish class without knowing!
2) You cannot have default values for functions (actually methods) parameters in Java. Would be useful, but it is not possible. Actually, recent versions (1.5?) of Java allows variable number of parameters, but the syntax isn't supported in Processing.
And you still have to manually supply the missing values (ie. to add tests in code: "if missing, use default value").
Actually, there is a way, not super elegant, but working, using method overloading: you declare two functions, one without parameters, one with full parameters (and perhaps more methods...).
Code:Stuff CreateStuff(float p1, float p2)
{
// Use p1 and p2
}
Stuff CreateStuff(float p1)
{
return CreateStuff(p1, 1.0 /* default value */);
}
Stuff CreateStuff()
{
return CreateStuff(0.1, 1.0); /* default values */
}