This Scratch-to-Java 7 converter is quite simple to use. When it asks you to name the class, give it any name you want. To add Java 7 code, click the scratch blocks at the bottom. The "end" block is a '}'. For this to be a successful Java program, there should be equal amounts of '{' and '}'. Exporting the list doesn't format the code correctly, so if you want to run this code in an actual Java 7 program, I suggest that you type the list yourself.
Credit to @MCAnimator3D for the if block and the two variable blocks, but the end block was designed by me. REVISIONS: April 18, 2014 - v1.0 - Released