-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloWorld.java
More file actions
32 lines (30 loc) · 1.05 KB
/
Copy pathHelloWorld.java
File metadata and controls
32 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package Phase0_SetupAndFirstPrograms;
/**
* <h1>Hello, World! — your first Java program</h1>
*
* <p>This is the classic starting point for learning any language. It defines a
* single class holding a <code>main</code> method — the entry point the JVM
* calls when the program runs — and prints one line of text to the console.</p>
*
* <h2>Anatomy of the program</h2>
* <ul>
* <li><code>public class HelloWorld</code> — every Java program lives inside a class.</li>
* <li><code>public static void main(String[] args)</code> — the method the JVM runs first.</li>
* <li><code>System.out.println(...)</code> — writes a line of text to standard output.</li>
* </ul>
*
* <h2>Compile and run</h2>
* <pre>
* javac HelloWorld.java // produces HelloWorld.class (bytecode)
* java HelloWorld // prints: Hello World
* </pre>
*
* @author Deepak Gupta
* @version 1.0
* @since 2026-05-21
*/
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}