Compiling Java Programs using the Command Line

Опубликовано: 30 Сентябрь 2024
на канале: Easy Learning
284
7

How to run a java program
Open a command prompt window and go to the directory where you saved the java program (MyFirstJavaProgram.java). ...
Type 'javac MyFirstJavaProgram.java' and press enter to compile your code. ...
Now, type ' java MyFirstJavaProgram ' to run your program.
You will be able to see the result printed on the window.