Basic Java Learning 9

Source: Internet
Author: User

Array Learning:


One-dimensional arrays:

1. Creating arrays for basic data types

byte short int long: After the array is created, the default value is 0;

Float double: The default value is 0.0;

Char: The default is a space;

Boolean: The default is False.

2. An array of variables that reference the data type: The default value is null. Take string as an example.


The array is stored in memory:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/F1/wKiom1Yu7OWCGgJ0AAEoNYZYxeU922.jpg "title=" Qq20151027111418.png "alt=" Wkiom1yu7owcggj0aaeonyzyxeu922.jpg "/>


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/EE/wKioL1Yu7erghm5DAAFkIPcmTk4950.jpg "title=" Qq20151027111755.png "alt=" Wkiol1yu7erghm5daafkipcmtk4950.jpg "/>


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/EE/wKioL1Yu7svC-rNfAAJCL6sYrCY358.jpg "title=" Qq20151027112144.png "alt=" Wkiol1yu7svc-rnfaajcl6syrcy358.jpg "/>


Note: Once an array is initialized, its length is immutable.

Basic Java Learning 9

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.