/*
Requirements: Demo A Hello World Java applet
Ideas:
1. Define a class. Because Java programs are defined in a class, Java programs exist in the form of classes, and the form of the class is actually the final embodiment of the bytecode
2. Define a main function. Allows the class to run independently.
3. Use the output statement. You can have the results of your program displayed on the console.
Steps:
1. Define the class and take a more readable class name.
2. Main function: public static void Main (string[] args). This is the fixed format that the JVM recognizes.
3. Output statement: System.out.println ("Output content");
* * Notice: Code is just a form of thought
*/
Class Demo
{
Define a main function to ensure that the program runs independently.
public static void Main (string[] args)
{
System.out.println ("Hello world!"); The output statement format, LN can act as a line break.
}
}
Java format specification and usage of annotations