Java Chapter II variables

Source: Internet
Author: User

1. What is a variable?

The basic unit of data storage.

2. The data type is divided into:

Basic types and reference data

3. Differences between the basic data type and the reference data type:

Base data: Different variables will allocate different storage space, changing one variable will not affect the other variable

Reference data type: assignment is to pass a reference to the original object to another reference, and two points to the same piece of memory space.

4. Variable name rules:

1. Must start with a letter

2. Can contain numbers but cannot start with a number

3. If the method name is a combination of multiple words, the first letter of the word must be capitalized.

Java Chapter II 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.