Week 6 Inheritance Vector, ArrayList and LinkedList

 0    11 フィッシュ    up804653
mp3をダウンロードする 印刷 遊びます 自分をチェック
 
質問 English 答え English
What are some of the problems of array structures?
学び始める
all elements must be same type, number of elements predetermined, inefficent
what does ArrayIndexOutOfBoundsException message indicate?
学び始める
you are making reference to an array index that is larger or smaller than the actual array.
what is a Vector
学び始める
the vector class in java is a kind of list that can grow as needed
What is a linkedList
学び始める
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);
学び始める
the vector will double its allocated space
when would you use a vector?
学び始める
if a thread-safe implementation is needed
if a thread-safe implementation is not needed what class would you use inplace of vector?
学び始める
ArrayList
are linked lists synchronised or unsynchronised?
学び始める
unsynchronised
what code do you use to rentern the number of items in an array list?
学び始める
int size();
what does Object get(int index); do for ArrayLists?
学び始める
//returns element at index without removing it
what does Object remove(int index) do for ArrayLists?
学び始める
//removes element at index and shifts up rest

コメントを投稿するにはログインする必要があります。