Yes. It's called a local inner class. If the method is static, this local inner class can only access static members of the enclosing class, as well as any local variables declared as final.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.