1.29 Summary

Source: Internet
Author: User

Most of the learning content is the same as the array content learned in the Java Foundation

What do you need to be aware of in an array?

Each element in the array must be of the same data type.
An array is a contiguous memory space
The elements in the array are variables or literal constants.
The array element subscript starts at 0.
After the array is created, each element is initialized. An int has an initialization value of 0,double of 0.0, and the initial value of the reference type is null.
The length of the array cannot be changed.
The element type of an array is the type defined when the array is declared.

How do I declare an array?

Example: int [] a = new int [array length] or int [] A = {element 1, element 2, Element 3}

1.29 Summary

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.