Hello world !, Helloworld
After the jdk environment is installed, write the first java program hello. java:
Public class hello {public static void main (String args []) {System. out. println ("hello world! ");}}
After compilation, the class file will appear.
Note:
1. The letters after the public class must match the file name case. Note that the characters are case-sensitive.
2. Write a pair of symbols in pairs, such as braces and parentheses.
3. Use the tab key to indent braces {} to develop a good indentation habit.
4. compiled source code needs to be compiled into class files
5. Enter the source code folder in cmd for compilation.
Javac hello. java
Java hello
What is Hello World?
"Hello, World" is so blunt. Generally, programmers like to use Hello World when compiling programs, because the first program that successfully compiled with C displays this sentence, then it becomes a symbolic sentence. For the program itself, world actually represents people. So you can simply say "Hello everyone ".
JAVA Hello World Program
Javac Hello. java