ArrayList Methods

studied byStudied by 6 people
0.0(0)
get a hint
hint

add(item)

1 / 12

Tags and Description

ArrayList Methods

13 Terms

1

add(item)

adds item to the end of the list

New cards
2

add(spot,item)

adds item at spot – shifts items up->

New cards
3

set(spot,item)

put item at spot   z[spot]=item

New cards
4

get(spot)

returns the item at spot   return z[spot]

New cards
5

size()

returns the # of items in the list

New cards
6

remove( int spot )

removes item at spot from the list

New cards
7

sort(x)

puts all items in x in ascending order

New cards
8

binarySearch(x,y)

checks x for the location of y

New cards
9

fill(x,y)

fills all spots in x with value y

New cards
10

rotate(x,y)

shifts items in x left or right y locations

New cards
11

reverse(x)

reverses the order of the items in x

New cards
12

contains(x)

checks if the list contains x

New cards
13

indexOf(x)

checks the list for the location of x

New cards

Explore top notes

note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 99 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 17 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 5 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 22 people
Updated ... ago
5.0 Stars(1)

Explore top flashcards

flashcards Flashcard164 terms
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard212 terms
studied byStudied by 19 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard43 terms
studied byStudied by 10 people
Updated ... ago
4.0 Stars(1)
flashcards Flashcard47 terms
studied byStudied by 39 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard50 terms
studied byStudied by 17 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard110 terms
studied byStudied by 45 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard39 terms
studied byStudied by 20 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard73 terms
studied byStudied by 3557 people
Updated ... ago
4.3 Stars(28)