This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
What is aggregate initialization of array? I have tried to search the web for this but could not really figure out what this term refers to.
All objects of non-primitive types can be created only via new. There�s no equivalent to creating non-primitive objects "on the stack" as in C++. All primitive types can be created only on the stack, without new. There are wrapper classes for all primitive classes so that you can create equivalent heap-based objects via new. (Arrays of primitives are a special case: they can be allocated via aggregate initialization as in C++, or by using new.)
Declares an int array reference variable with name array Creates an int array with a length of three elements populates the array's elements with value 1,2,3 Assigns the array object to the variable array