how an array can be initialised?
Answers
Answered by
3
Answer:
Array Initialization in Java
To use the array, we can initialize it with the new keyword, followed by the data type of our array, and rectangular brackets containing its size: int[] intArray = new int[10]; This allocates the memory for an array of size . This size is immutable
Answered by
2
Answer:
The initializer for an array is a comma-separated list of constant expressions enclosed in braces ( { } ). The initializer is preceded by an equal sign ( = ). You do not need to initialize all elements in an array. ... The same applies to elements of arrays with static storage duration.
Explanation:
I hope it's helpful for you.
Similar questions