I'm looking for a quick way to run multiple blocks of Java code from Stack Overflow one code block at a time. Many Java questions at Stack Overflow have multiple answers, and I want to test most or all of the answers to a given question with my own data to determine if the code works or not. For the purpose of answering this question the Java code block doesn't need to be executable as is, because I can edit the code and add the first line(s) of code and their closing bracket(s) and the data so that the code block runs and gives output. Console output would be enough.
I don't want to have to create a project each time I run a new block of Java code. I want to copy/paste a code block and run it without making a project of any kind. The reason for this is I expect to reject most of the code blocks that I try, and I don't want to clutter my system with a lot of useless projects. That rules out some Java IDEs that I know about.
I'm not looking for an online application.