第一课 Hello World程序

  接触一门编程语言都是从HelloWorld开始的。我们以Idea为开发工具,写一个JAVA版的HelloWorld。

  1,启动idea,点击菜单 File->New->Project

   新建一个Java工程

  2,右键点击src目录 New->Java Class 在新建的文件中打开写入以下代码

public class HelloWorld {
    public static void main(String[] args)
    {
        System.out.println("hello world");
    }
}

  3,运行后结果如下

Connected to the target VM, address: 'javadebug', transport: 'shared memory'
hello world
Disconnected from the target VM, address: 'javadebug', transport: 'shared memory'

Process finished with exit code 0

猜你喜欢

转载自www.cnblogs.com/tian5339/p/9657715.html