'Immediate' window for IntelliJ
Intellij IDEA's Expression Evaluation dialog has a button to enable Code Fragment Mode, which permits multi-statement evaluations. (I'm using version 9.0.2 of the Ultimate Edition.)
Same as @Noel answer, but some more details. First of all, Expression Evaluation (ALT + F8) can be enabled only in debug mode.
IntelliJ IDEA 13 Community Edition, Windows:
- Go to Debug mode and run the application
-
Go to Evaluate Expression:
or right click in the editor area:
Go to Code Fragment Mode
Type your statements and click on Evaluate