what does an array contain when it is declared?
For example, when i declare an int array numbers like:
int[] numbers=new int[5];
now without intializing any values, i tried to print that array.So it showed me that all elements inside that array were 0.
Now if 0 means empty, then if i assign some random values to that arrays, and then i assign
say for eg, number[3]=0.
does this mean that that element is empty or it means that it is simply assigned 0 value.
hszforu -3 Junior Poster in Training
gerard4143 371 Nearly a Posting Maven
hszforu -3 Junior Poster in Training
Mitja Bonca 557 Nearly a Posting Maven
hszforu -3 Junior Poster in Training
Mitja Bonca 557 Nearly a Posting Maven
hszforu -3 Junior Poster in Training
Narue 5,707 Bad Cop Team Colleague
hszforu -3 Junior Poster in Training
Narue 5,707 Bad Cop Team Colleague
hszforu -3 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.