Tag: element content has no rule relationship type underlying data type declaration overload
1. Translation rules for 8 basic data types in Java
Automatic conversions are converted in order from low to high. is an automatic hermit conversion, the priority relationship between different types of data is as follows:
Low---------------------------------------------> High
Byte,short, int-long-float-double
2. Two-dimensional array
type[][] i = new type[2][3];
Each element of a two-dimensional array is a one-dimensional array, and these arrays are not necessarily equal in length.
When declaring a two-dimensional array, you can specify only the first-dimension size, the second-dimension size, and then the array of different lengths. Note, however, that the first-dimension size cannot be empty (you cannot specify only the number of columns without specifying a row).
3. Overloading
The difference between overloads is that the parameters are different:
(1) different parameter order (2) different parameter types (3) different number of parameters
The formal parameters do not allocate actual memory space;
Data passing on a reference type is also a value, but this is an address, so it is possible to change the value of the original reference type variable in the accepted method.
Java Basic theory--basic syntax