-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Array List -Methods
a.remove(index);
a.add(value) //adds to the end
a.add(index,value); //add at a particular place and move others to right
a.set(index,value); //Dont move anything-just replace
a.clear() //clear arraylist
Collections.sort(arraylist) // sort an array list
Collections.sort(arraylist,i,j) //sort arraylist from a position
Arrays
Arrays.sort(array) //sort an array
Arrays.sort(nums,0,j+1);
Arrays.toString() //Print array
String
A.contains(b) //check if a has b
Iterate on a stack
Stack test = new stack<>();
stack.push(0);
stack.push(1);
Iterator iter = stack.iterator()
while(iter.hasNext()){
println(stack.pop());
}
Metadata
Metadata
Assignees
Labels
No labels