Question
Which method in the ArrayList class can be used to get or set the number ofelements that an ArrayList can contain?a. Length( )b. Size( )c. Dimension( )d. Rank( )e. Capacity( )
Step 1
It is asking for a method or property in the ArrayList class that can be used to get or set the number of elements that an ArrayList can contain. Show more…
Show all steps
Your feedback will help us improve your experience
Ernest Castorena and 67 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Which method in the ArrayList class can be used to place a value onto the end of the ArrayList? a. AddLast( ) b. AddLastIndex( ) c. Add( ) d. Insert( ) e. none of the above
Which class includes methods to create a dynamic one-dimensional structure? a. Array b. string c. array d. ArrayList e. all of the above
When you pass an element from an ArrayList to a method, the method receives: a. a copy of the ArrayList b. the address of the ArrayList c. a copy of the value in the element of the ArrayList d. the address of the element in the ArrayList e. none of the above
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD