Initializing Elements and Declaring an Array At the moment of declaration, an array can be initialised. The compiler will allocate an array of size equal to the number of array elements in this method of array declaration. To declare and initialise an array at the same time, use the following syntax.
Share a personalized message with your friends.