2.1JAVA Basics Review the basic composition of--java language comments and constant variables

Source: Internet
Author: User

/**    This is a   single multi-line comment  in Java * /

The basic components of the Java language are:

1. Keywords: words that are given special meanings.

2. Identifier: the symbol used to identify.

3. Note: The text used to annotate the description program.

4. Constants and variables: Representations of memory storage areas.

5. Operator: the symbol used in the program to operate.

6. Statement: Some of the statements commonly used in the program.

7. Function: Also called method, used to do some specific action.

8. Array: A collection used to store multiple data.

Comments in Java:

Annotations can also be used to narrow the scope of program errors to make it easier to find errors.

: Represents a single-line comment.

// This is a single-line comment

/**/: Represents a multiline comment.

/*    This is a   multiline comment   * /

Multi-line annotations unique to the/***/:java

/**    This is a single multi-line comment in Java * /

Constants and Variables in Java:

Constant: A quantity whose value is immutable, and can be defined only once, and is typically used to define constant quantities such as:

 Public Static Final String str= "Constant"

Variable: The amount of value that can be changed, a storage area in the memory space, often used to define the amount of change that is often needed, such as:

int age =:age =19; // At this point, age can change the value of age to overwrite the original value into

2.1JAVA Basics Review the basic composition of--java language comments and constant variables

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.