An interpretation of a Java program

Source: Internet
Author: User

Java language is an object-oriented programming language, the basic component of Java program is a class, the class body can also include attributes and methods two parts. Each application must contain a main () method, and the class containing the main () method is called the main class. When a program needs to be executed, the file name (and the main class name) of the main class is entered after the Java command, so the main class file is the first user file to be loaded into the virtual machine after the Java runtime is established, such as:

The main class name (filename) is Hello.java, where each parameter has the following meanings:

Main: The entry method name.

Args: A command-line argument, which is an array of string objects.

Static: Modifier word, stating that main () is a static method (class method).

Public: The modifier word, which indicates that main () has publicly accessed properties.

1.public static void Main (string[] args) The entry method of the//java program, where the program will begin execution

2.system.out.println ("helloworld!"); /print a statement to the console

An interpretation of a Java program

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.