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w1BuTE29V2FJKicJSu8iEOpfoafwJISXmz1wnnWL3V/0NxTulfWsXugOoLfv0ZIBP1xH9kmf22jjQ2JiHhQZP7ZDsreRrOeIQ/c4yR8IQvMLfC0WKQqrHu5ZzXTH4NO3CwGWSlTY74kE91zXB5mwWAx1jig UXYc2w4RkVhy0//lOmVya/PEepuuTTI4 UJwC7qbVlh5zfhj8oTNUXgN0AOc Q0/WFPl1aw5VV/VrO8FCoB15lFVlpKaQ1Yh DVU8ke rt9Th0BCHXe0uZOEmH0nOnH/0onD

2、详解 IDEA 创建一个“Hello World” 项目

很多刚开始使用 IDEA,甚至是刚接触编程的读者不知道如何使用 IDEA 创建程序,本篇推文就教大家如何使用 IDEA 创建 Hello World 程序,让初学者少走弯路、高效学习!

创建步骤

1、首先我们打开 IDEA,点击图示的 New Project

2、选择左上角的 Java,然后在右边选择你电脑上安装的 JDK 目录,点击 Next,

3、这里我们不选择 IDEA 推荐的创建,不要勾选左上角,啥也别管直接点击 Next。

4、给项目命名,我直接命名的是 Hello World。下面的 Project location是这个项目存放的本地位置,然后点击 Finish。

5、现在我们的项目已经创建好了。名字为 src 的文件夹就是我们存放代码的地方。

6、鼠标放到 src 上面,点击右键选择 New 再点击 Package 创建一个文件夹,并且命名,然后回车。

7、在我们刚刚新建的文件夹立,新建一个 Java Class ,命名为 HelloWorld ,然后回车。

8、这时候我们的 Hello World 类就创建成功啦。

9、在花括号内,写上我们的 Java 语句,

代码语言:javascript复制
public static void main(String[] args) {
  System.out.println("Hello World!");
}

10、写完之后,就可以运行我们的程序啦!运行程序的方法有两种:

  • 使用快捷键:Ctrl Shift F10,同时按住 Ctrl、Shift 和 F10。
  • 点击鼠标右键,再点击 Run HelloWorld.main()。

11、运行之后,你就可以在下方控制台,看到输出的结果啦!

好啦,我们的第一个 Hello World 程序就已经完成了。

0 人点赞