-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHello World
More file actions
36 lines (32 loc) · 1.89 KB
/
Copy pathHello World
File metadata and controls
36 lines (32 loc) · 1.89 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
33
34
35
36
/*
Requirements: Build a hello world program.
要求:构建一个hello world程序。
Ideas:
1. Define a class, because java programs are defined in the class, java programs are in the form of a class exists, in fact, the form of a byte code file is the ultimate embodiment.
2. Define a main function hello wolrd, in order to allow the class to run independently.
3. Because the demo hello world, see the words in the console, so need to use the output statement to complete.
思路:
1.定义一个类,因为java程序都定义类中,java程序都是以类的形式存在的,类的形式其实就是一个字节码文件最终体现。
2.定义一个主函数hello wolrd,为了让类可以独立运行。
3.因为演示hello world,在控制台上看到该字样,所以需要使用输出语句完成。
Code is only an expression of thought.
代码仅仅是思想的一种体现形式。
step:
1. Use calss keyword to complete the definition of the keyword, and play a strong reading class name.
2. Main function: public static void main (String [] args) This is a fixed format. Jvm understanding.
3. Use the output statement: System.out.println ("Hello world");
步骤:
1.用calss关键字来完成关键字的定义,并起一个阅读性强的类名。
2.主函数:public static void main(String[] args)这是固定格式的。jvm认识。
3.使用输出语句:System.out.println("Hello world");
*/
class Demo
{
//Define a main function, in order to ensure the operation of the program.
//定义一个主函数,为了保证程序的运行。
public static void main(String[] args)
{
System.out.println("Hello world");//Define a main function, in order to ensure the operation of the program....
//这是输出语句,用于将括号中的数据打印到控制台上,ln可以在数据的结尾处换行。
}
}