如何使用记事本编写java程序

2022-07-14 20:15:16   第一文档网     [ 字体: ] [ 阅读: ] [ 文档下载 ]
说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。下载word有问题请添加QQ:admin处理,感谢您的支持与谅解。点击这里给我发消息

#第一文档网# 导语】以下是®第一文档网的小编为您整理的《如何使用记事本编写java程序》,欢迎阅读!
编写,记事本,程序,使用,如何

Java is a programming language which can write cross platform application software object oriented, excellent versatility, high efficiency, portability and security of Java technology, widely used in personal PC, data center, game console, scientific super computer, mobile phone and internet. 电脑

Computer

新建java第一种方法

The new Java the first method

1首先右击鼠标,新建一个文本文档。

1 first right click, create a new text document.

2更改文本文档的后缀名为 .java 。注意文件名必须和类名相同。

The 2 change text document called the suffix.Java. Note that the file name and the class name must be the same.

如果你的电脑没有显示后缀名的话需要对电脑进行一定的设置。

If your computer does not display the suffix name you need to configure the computer.

3打开计算机——组织——文件夹选项——查看——将隐藏文件夹选项取消勾选即可。

3 open the computer -- organization -- -- -- will hide the folder options to view the folder options uncheck.

建议将这个选项取消勾选,有很多的恶意程序会侵入我们的电脑,取消勾选可以很好的查看病毒等文件的类型。

Recommend this option to uncheck the box, there are many malicious programs will invade our computer,http://www.heshengdangan.com/ uncheck the check virus types of documents such as good.

4右击建好的文档,选择编辑即可进行java的编写。

4 right click the completed document editor, choose to write to java.

在编写的时候我们有一定的格式,java语言的格式是为了我们日后更改程序方便而规定的,我们一定要遵循这种格式编写。




At the time of writing we have certain format, Java language format is to our future change procedure is convenient and the provisions,http://www.cfjczs.com/ we must follow this format.

第二种方法

Second kinds of methods

1直接新建一个记事本文档,然后选择保存。

1 direct a new Notepad document, and then choose save.

注意保存时额位置,不要等到保存完却找不到文件到哪了。

Pay attention to the preservation of forehead position when,http://www.makaxiaoguo.com/ do not wait until the preserved but can not find the file to which the.

2在选择保存的窗口中输入后缀“.java,然后保存即可。注意文件名必须和类名相同。

Input the suffix ".Java" option to save 2 in the window, and then you can save. Note that the file name and the class name must be the same.

3同样右击文件,选择编辑即可在文件中进行编辑了。

3 the same right-click the file, select Edit to edit the file.

前两个大括号之间回车,第二对大括号有一个间隔,直接按TAb键即可。

Enter between the former two braces,http://www.tianlaipai.com/ second there is an interval of braces, press the TAb button.

测试运行java程序

The test run of Java program

1打开运行命令,也可以直接在开菜单中输入CMD调用命令窗口。

1 open the run command, also can enter the CMD command window directly in the open menu.

2你的文件保存在哪里就将你的文件目录输入到命令提示符窗口中,例如我的是D盘根目录,所以我输入“d

2 you save the file where the input your file directory to the command prompt window, for example I is the D root directory, so I typed "d:".




3编译java文件,生成class文件。

3 the compiled Java file, class file generation.

在命令提示符中输入“javac 文件名.java,我的文件名为A,所以输入javac A.java然后回车,等待编译。

Input "javac file name.Java" at the command prompt, the file name is A, so the input javac A.java and press enter, waiting for the compiler.

4运行文件。

4 run file.

继续输入“java 文件名”然后回车就可以运行我们写好的文件了。

Continue to enter the "java file" and then press enter to run our written documents.


本文来源:https://www.dywdw.cn/88b9df78376baf1ffc4fadb0.html

相关推荐
推荐阅读