/**
Author: haha
Version: V1.0
This class is used to demonstrate Hello world.
*/
Class Demo//This is my first Java applet,//Very cool!
{
/*
The main function guarantees that the operation is independent.
It is the entrance to the program.
It will be called by the JVM.
*/
public static void Main (string[] args)
{
/*
System.out.println ("Hello java");//This is an output statement that can print the contents of the parentheses.
System.out.println ("Hello World");/?????
*/
System.out.println ("Hello java");
System.out.println ("Hello World");
}
}
--------------------------------------------------------------------------------------------------------------- ------
/*
Requirements: Define a Hello World applet.
Steps:
1, define a class with the class keyword. Code is written to the class.
2, in order to ensure that the independent operation. Define a main function in the class. Format public static void Main (string[] args)
3, save as a file with the extension java.
4. Compile the Java file in the DOS console using the Javac tool.
5, the generated class file is executed with the Java command.
*/
Class demo//defines a category.
{
The main function.
public static void Main (string[] args)
{
The output statement.
System.out.println ("Hello haha");
}
}
Hello world Getting Started with Java applets