Java’s first cry "Hello, World!"
- Create a new .Java file
- Code such as:
public class Hello{
public static void main(String[] args){
System.out.print("Hello,World~");
}
}
- In the code path folder, add a cmd space in front, and open the Java path in cmd.
- Input javac.java file (need to add the suffix class), compile the code to generate class file.
- Enter the java class file (no need to add the suffix class) and run the code.