How to run a highlighted code only in IntelliJ IDEA? Sometimes you don't need to run the whole file and wants to just run the some numbers of code. Are there any such choices in IntelliJ IDEA?
It's possible to evaluate arbitrary expressions (Run | Evaluate Expression):
To evaluate a code fragment, click the Code Fragment Mode button and fill in the Code Fragment text box.
You can also use the Scratches feature.
Since version 15 Java scratches are runnable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With