Week 6 Inheritance Vector, ArrayList and LinkedList

 0    11 fiche    up804653
baixar mp3 Imprimir jogar verifique-se
 
questão English resposta English
What are some of the problems of array structures?
começar a aprender
all elements must be same type, number of elements predetermined, inefficent
what does ArrayIndexOutOfBoundsException message indicate?
começar a aprender
you are making reference to an array index that is larger or smaller than the actual array.
what is a Vector
começar a aprender
the vector class in java is a kind of list that can grow as needed
What is a linkedList
começar a aprender
A linked list is a data structure that consists of a sequence of nodes, where each node contains some data and the address of the next node.
what will happen when you add an 11th item to: Vector(10);
começar a aprender
the vector will double its allocated space
when would you use a vector?
começar a aprender
if a thread-safe implementation is needed
if a thread-safe implementation is not needed what class would you use inplace of vector?
começar a aprender
ArrayList
are linked lists synchronised or unsynchronised?
começar a aprender
unsynchronised
what code do you use to rentern the number of items in an array list?
começar a aprender
int size();
what does Object get(int index); do for ArrayLists?
começar a aprender
//returns element at index without removing it
what does Object remove(int index) do for ArrayLists?
começar a aprender
//removes element at index and shifts up rest

Você deve entrar para postar um comentário.