What is array initializer?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is array initializer?
Rating:
An array initializer is a list of values or expressions used to simultaneously create and initialize the elements of an array. The values contained in an array initializer are separated by commas and placed within curly braces, i.e., between "{" and "}". When an array initializer is used to initialize an array, there is no need to specify the size of the array. The number of elements inside the array initializer determines the size of the array.
Rating:
Was this information helpful?
Other articles
- What are static variables?
- What is a block?
- What is the == operator?
- What is the instanceof operator?
- What are local variables?