2-writing Java programs using Notepad

Source: Internet
Author: User

The first step: Use Notepad to edit, Myprogram.java, the source file suffix named. java

Step two: Compile, Javac, build. class file, or bytecode file

Step three: Using the Interpreter, Java

VERBOSE: New Notepad--Change the file name (including suffix name, instead. java)--write program--compile--explain

Test code:

public class helloworld{
public static void Main (string[] args) {
System.out.println ("Welcome to imooc!");
}

}

(If you don't see the file suffix, set it to the folder option)

(It is best to save the program after the root of a disk, note the location, if it is stored in the e-packing directory, the file name is Helloworld.java)

Compile process: Open cmd, enter e:, enter, then enter e disk

Enter dir and enter, then view e packing directory file

Input Javac Helloworld.java, enter, see E disk generated Helloworld.class bytecode file

Explanation Process:

On the basis of the compilation process and then enter the Java HelloWorld, enter (note that at this time HelloWorld do not add the suffix name of Class)

Output Welcome to imooc!, proof of successful compilation

2-writing Java programs using Notepad

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.