Use Notepad to write a Java program full process diagram _java

Source: Internet
Author: User

Java is an object-oriented programming language that can compose cross-platform applications, a generic term for the Java programming language and Java platform (Javase, Java EE, javame), which was launched by Sun Microsystems in May 1995. Java technology, with its superior versatility, high efficiency, platform portability and security, is widely used in personal PCs, data centers, gaming consoles, science supercomputers, mobile phones and the Internet, and has the world's largest developer professional community.

The first method of new Java

1 First right-click the mouse, create a new text document.

2 Change the text document to a suffix named. java. Note The file name must be the same as the class name.

If your computer does not display the suffix name, you need to set up a certain computer.

3 Open Computer-Organization-Folder Options-View-uncheck the hidden folder options.

This option is recommended to uncheck, there are a lot of malicious programs will invade our computer, uncheck can be very good to see the types of files such as viruses.

4 Right click on the built document, select Edit can be written in Java.

In writing we have a certain format, the Java language format for our future changes in the convenience of the rules, we must follow this format to write.

The second method

1 Create a new Notepad document, and then choose Save.

Note the save time position, do not wait until the save is not found where the file.

2 Enter the suffix ". Java" in the selected saved window and save it. Note The file name must be the same as the class name.

3 also right click on the file, select Edit can be edited in the file.

The first two curly braces between the carriage return, the second pair of braces have an interval, directly press the TAB key.

Test Run Java Program

Open the Run command, or you can enter CMD to invoke the command window directly in the Open menu.

Where your files are saved, enter your file directory into the command Prompt window, for example, mine is the D-Packing directory, so I type "D:".

Compiles a Java file and generates a class file.

At the command prompt, enter "Javac filename. java", my file name is a, so enter Javac A.java and then return to wait for compilation.

Run the file.

Continue typing "Java filename" and enter to run the file we have written.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.