How to handle user input

Java 7 and high support strings in switch statements.
I can verify that Processing 3.5.4 works with your example.

Open Gemini response:

A Brief History

  • Early Versions: Processing was started in 2001, so it initially used older versions of Java (like Java 1.3 or 1.4).
  • Processing 2.x: The major release of Processing 2 (released between 2012 and 2014) was built on top of Java 6, but it could also run on Java 7. The developers began to incorporate features from newer Java releases as they became stable.
  • Processing 3.x: Processing 3, released in 2015, made the transition to Java 8, which was a significant update with new language features like lambdas.
  • Current Versions: The latest versions of Processing are now built on Java 17.

:)