Jump to content

Arrays: Difference between revisions

Line 4,657:
Both which provide a substantial amount of implementing classes, for various types of dynamic array related tasks.<br />
The most logical, for this demonstration, would be the ''ArrayList'' and ''ArrayDeque''.<br /><br />
The ''ArrayList'' declaration is slightly different than that of the array, as you are simply calling the constructor of a class.<br />
We'll use ''List'' as our declaring type, since, as with most interfaces, it's more logical to specify it as the declaring type during the instantiation of any implementing type.<br />
Immediately after the declaring type you'll use the 'diamond operators', &lt; and &gt;, with the data type of the array specified within.
118

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.