| |

VerySource

 Forgot password?
 Register
Search
View: 1091|Reply: 0

第一个java程序

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2022-6-11 17:51:10
| Show all posts |Read mode
下载好JDK,配置好环境变量

1. 新建Hello.java
编写:
  1. <div>public class Hello{</div><div>        public static void main(String[] args){</div><div>                System.out.println("HelloWorld!");</div><div>        }</div><div>}</div>
Copy the Code
2.javac命令 编译
javac Hello.java
会生成Hello.class文件

3.java命令 运行
java Hello
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list