Why does .getConstructor fail with a NoSuchMethodException despite zero-arg constructors existing for the class?

Java’s keyword this represents the current class’ code block type.

Your newInstance(this) expects you to pass a PApplet type.

But b/c you’re inside a class block, its type is of the same of the class that block belongs to!

2 Likes