Additions to Hello World guidance. (#27929)
Mention about .class files and not using .class extension while running.
This commit is contained in:
@ -116,7 +116,9 @@ Now open the terminal / Command Prompt. Change your current directory in the ter
|
|||||||
|
|
||||||
$ javac HelloWorld.java
|
$ javac HelloWorld.java
|
||||||
|
|
||||||
Now run the file using `java` command!
|
If your program compiled successfully, you can see the bytecode file or class file `HelloWorld.class` generated by the java compiler `javac` in the same folder.
|
||||||
|
|
||||||
|
Now run the file using `java` command! Please note that the `.class` extension is not used while running the class file.
|
||||||
|
|
||||||
$ java HelloWorld
|
$ java HelloWorld
|
||||||
Hello, World
|
Hello, World
|
||||||
|
Reference in New Issue
Block a user