java - Does an Array's specified capacity include 0? -


when declare array:

int[] array = new int[2] 

when specify capacity of (in case 2) include 0 or not? if did include 0 indexes be: 0,1,2 , if didn't 1,2 please answer question need know. in advance :)

what call capacity, size, or better length of array, i.e. amount of items can store in array.

the indexing start zero, therefore, can figure out yourself, if start 0 , have array of length n, indexes start 0 , ends in n-1, i.e. last item in array @ n-1 index.


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -