IN the Java programming language, arrays are objects ,and dynamically
created, and may be assigned to variables of type Object. All methods of
class Object may be invoked on an array.
Let's talk about Array variables:
A variable of array type holds a reference to an object. Declaring a variable of array
type does not create an array object or allocate any space for array components. It
creates only the variable itself, which can contain a reference to an array.
And interesting thing is about the array declaration style.
Example:
byte[ ] set, get, wet[ ];
This declaration is equivalent to:
byte set[ ], get[ ], wet[ ] [ ];
It is not recommend "mixed notation" in an array variable declaration, where
brackets appear on both the type and in declarators
created, and may be assigned to variables of type Object. All methods of
class Object may be invoked on an array.
Let's talk about Array variables:
A variable of array type holds a reference to an object. Declaring a variable of array
type does not create an array object or allocate any space for array components. It
creates only the variable itself, which can contain a reference to an array.
And interesting thing is about the array declaration style.
Example:
byte[ ] set, get, wet[ ];
This declaration is equivalent to:
byte set[ ], get[ ], wet[ ] [ ];
It is not recommend "mixed notation" in an array variable declaration, where
brackets appear on both the type and in declarators
0 comments:
Post a Comment