Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMaggie Nasho
6,212 PointsList
lockCombination has a capacity of after running the following code.
List lockCombination = new List();
lockCombination.Add(12); lockCombination.Add(42); lockCombination.Add(13);
2 Answers
Harikant Kumar
4,306 PointsIn this case capacity will be 4. By default capacity is zero, as soon as we add a item in it init with 4, and after reaching this point it get increased again to 8. here you have added three item only so it should 4.
HIDAYATULLAH ARGHANDABI
21,058 PointsDear Maggie, It will be 4.
Harikant Kumar
4,306 PointsHarikant Kumar
4,306 PointsIn this case capacity will be 4. By default capacity is zero, as soon as we add a item in it init with 4, and after reaching this point it get increased again to 8. here you have added three item only so it should 4.