Podcast
Questions and Answers
Which method is used to add an object at the beginning of a linked list?
Which method is used to add an object at the beginning of a linked list?
- add(int pos, T ob)
- ass(T ob)
- addFirst(T ob) (correct)
- addLast(T ob)
Which method is used to add an object at the end of a linked list?
Which method is used to add an object at the end of a linked list?
- ass(T ob)
- addLast(T ob) (correct)
- add(int pos, T ob)
- addFirst(T ob)
Which method is used to add all elements from a collection to the end of a linked list?
Which method is used to add all elements from a collection to the end of a linked list?
- addAll(Collection <. extends T> c) (correct)
- addFirst(T ob)
- addLast(T ob)
- addAll(int pos, Collection <. extends T> C)
Which method is used to add all elements from a collection at a specific position in a linked list?
Which method is used to add all elements from a collection at a specific position in a linked list?
Which method is used to remove all objects from a linked list?
Which method is used to remove all objects from a linked list?