I want to compile and run in the single command line. Usually, we first compile and after the run?
javac example.java
java example
can I run this,
javac example.java && java example
Since Java 11 you can use a single command
java example.java
https://openjdk.java.net/jeps/330
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